MySQL Forums :: Newbie :: SELECT took lengthy of time


Advanced Search

SELECT took lengthy of time
Posted by: Man Fan ()
Date: August 23, 2010 07:23PM

I got a table has 2 million records: stationlog

`StationLogID` VARCHAR(36) NOT NULL DEFAULT '',
`StationID` VARCHAR(36) DEFAULT NULL,
`AnnouncerID` VARCHAR(36) DEFAULT NULL,
`StationFeedTime` TIME DEFAULT NULL,
`StationAirTime` TIME DEFAULT NULL,
`Duration` TINYINT(4) DEFAULT NULL,
`CrossMethod` CHAR(2) DEFAULT NULL,
`AirDate` DATE DEFAULT NULL,
`BookingID` VARCHAR(36) DEFAULT NULL,
`ItemNo` SMALLINT(6) DEFAULT NULL,
`Aired` ENUM('F','T') DEFAULT 'F',
`AiredTime` TIME DEFAULT NULL,
`SpotType` CHAR(1) DEFAULT NULL,
`SpotRate` FLOAT DEFAULT NULL,
`MissType` CHAR(2) DEFAULT NULL,
`Available` ENUM('F','T') DEFAULT 'T',
`TagType` CHAR(1) DEFAULT NULL,
PRIMARY KEY (`StationLogID`),
KEY `idx_stationlog_announcerid` (`AnnouncerID`),
KEY `idx_stationlog_airdate` (`AirDate`),
KEY `idx_stationlog_stationid` (`StationID`),
KEY `idx_stationlog_feedtime` (`StationFeedTime`),
KEY `idx_stationlog_bookingid` (`BookingID`),
KEY `idx_stationlog_itemno` (`ItemNo`)
) ENGINE=INNODB DEFAULT CHARSET=latin1

It took 2 minutes and 30 seconds to execute this SELECT SQL:
SELECT *
FROM stationlog
WHERE airdate >= '2010-03-01'
and airedate <= '2010-03-31'

This is not acceptable as it took so long.
Any way I can speed that up?

Options: ReplyQuote


Subject Written By Posted
SELECT took lengthy of time Man Fan 08/23/2010 07:23PM
Re: SELECT took lengthy of time adam island 08/23/2010 08:07PM
Re: SELECT took lengthy of time Man Fan 08/23/2010 09:51PM
Re: SELECT took lengthy of time Shawn Taylor 08/24/2010 01:15PM
Re: SELECT took lengthy of time Man Fan 08/24/2010 09:26PM
Re: SELECT took lengthy of time Rick James 08/25/2010 09:07PM
Re: SELECT took lengthy of time Man Fan 08/26/2010 07:05PM
Re: SELECT took lengthy of time Rick James 08/26/2010 08:10PM
Re: SELECT took lengthy of time Man Fan 08/26/2010 10:05PM
Re: SELECT took lengthy of time Rick James 08/26/2010 11:17PM
Re: SELECT took lengthy of time Man Fan 08/28/2010 05:42AM
Re: SELECT took lengthy of time Rick James 08/28/2010 10:54AM
Re: SELECT took lengthy of time Man Fan 08/29/2010 10:20PM
Re: SELECT took lengthy of time Rick James 08/29/2010 10:24PM
Re: SELECT took lengthy of time Hari sankar A 08/23/2010 10:55PM
Re: SELECT took lengthy of time Man Fan 08/23/2010 11:56PM
Re: SELECT took lengthy of time Hari sankar A 08/24/2010 12:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.