I've got what would be best described as a medium sized table, which
normally queries quickly, except for this one...
Table data_static has around 35,000 records.
This trivial query:
SELECT tracking_id,
complainant_email,
DATE_FORMAT(import_date,'%Y-%c-%e') AS date,
subject
That would be my guess, the extra time is the data transfer. You can
easily verify this by changing your query to:
SELECT COUNT(*)
FROM data_static
WHERE case_id = 0;
That will give you the raw query time without the data transfer or
formatting overhead.
On Wednesday, January 8, 2003, at
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 10:32 AM
Subject: Disproportionately slow, but simple, query
I've got what would be best described as a medium sized table, which
normally queries quickly, except for this one...
Table data_static has around 35,000 records
Sahay [EMAIL PROTECTED]
To: Jim [EMAIL PROTECTED]
Sent: Wednesday, January 08, 2003 11:56 AM
Subject: Re: Disproportionately slow, but simple, query
can you send the description of your table. There are lots of reasion for
slowing down your query but I dont thint Date_formate () is a cause
FYI:
Setting up a lab environment for this database answered my question.
I moved the big field to a dedicated table, and queries on data_static got
much faster. Instead of 60 seconds, the query is done in less than 1.
Thanks for all the ideas people sent me privately.
Cheers,
Jim