On Tuesday 07 December 2004 02:51 pm, you wrote:
> mysql> explain select * from queryLog where date_format(queryTime,
> '%Y-%m-%d') =
> '2004-11-16';
> mysql> explain select * from queryLog where queryTime =
> date_format('2004-11-16'
> , '%Y-%m-%d');
> +--+--+---+---
mysql> explain select * from queryLog where date_format(queryTime,
'%Y-%m-%d') =
'2004-11-16';
+--+--+---+--+-+--+--+-+
| table| type | possible_keys | key | key_len | ref | rows |
Extra |
+--+--+---+--
On Tuesday 07 December 2004 02:03 pm, Victor Pendleton wrote:
> A function on the left hand side will nullify the use of an index.
Sides dont matter, a function on an index, no matter what side, will kill an
index.
Jeff
pgpsVFJcgS9kp.pgp
Description: PGP signature
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 07, 2004 11:34 AM
To: [EMAIL PROTECTED]
Subject: slow date query
Hi,
I'd really appreciate any help in speeding up this type of query
SELECT BindId,RecordType from BrowseData WHERE
DATE_FORMAT(DateLastRevised,'%Y-%m-%d') = '2004-12
--
From: Dathan Pattishall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 07, 2004 12:05 PM
To: Marc Dumontier; [EMAIL PROTECTED]
Subject: RE: slow date query
Well 1st of all Date_format doesn't allow the use of a key.
Do this.
SELECT ..
WHERE DateLastRevised >= '2004-12-07' A
er 07, 2004 11:34 AM
To: [EMAIL PROTECTED]
Subject: slow date query
Hi,
I'd really appreciate any help in speeding up this type of query
SELECT BindId,RecordType from BrowseData WHERE
DATE_FORMAT(DateLastRevised,'%Y-%m-%d') = '2004-12-07';
On a MYISAM table of 122,000 rows
A function on the left hand side will nullify the use of an index.
Marc Dumontier wrote:
Hi,
I'd really appreciate any help in speeding up this type of query
SELECT BindId,RecordType from BrowseData WHERE
DATE_FORMAT(DateLastRevised,'%Y-%m-%d') = '2004-12-07';
On a MYISAM table of 122,000 rows, t
Hi,
I'd really appreciate any help in speeding up this type of query
SELECT BindId,RecordType from BrowseData WHERE
DATE_FORMAT(DateLastRevised,'%Y-%m-%d') = '2004-12-07';
On a MYISAM table of 122,000 rows, this query takes very long, in the
neighbourhood of 20 minutes.
i'm using mysqld 4.0.20.