Javier Diaz wrote:
EXPLAIN SELECT * FROM process_times
WHERE date <= date_sub(now(), INTERVAL 2 day)
date_idx,date_proc_idx
(NULL)
10778561
EXPLAIN SELECT * FROM process_times
WHERE date = date_sub(now(), INTERVAL 2 day)
date_idx,date_proc_idx
date_idx
1863456
My
NDITIONS]
Thanks a lot for your help
Javier
-Original Message-
From: Jigal van Hemert [mailto:[EMAIL PROTECTED]
Sent: 05 January 2006 14:39
To: Javier Diaz
Cc: Aftab Khan; mysql@lists.mysql.com
Subject: Re: Problems with indexes on Date/DateTime fields
Javier Diaz wrote:
> I would
Javier Diaz wrote:
I would like to know if there is any problem which cause Mysql to not
use date indexes at least you use the "=" operator, because if that is
the case we will need to re-visit a few queries
If you do a select instead of a delete, will the index be used? (You can
check th
hat is
the case we will need to re-visit a few queries
Thx
Javier
-Original Message-
From: Aftab Khan [mailto:[EMAIL PROTECTED]
Sent: 05 January 2006 11:25
To: Javier Diaz
Subject: RE: Problems with indexes on Date/DateTime fields
I agree. Some time full table scan is faster than
avier
-Original Message-
From: Aftab Khan [mailto:[EMAIL PROTECTED]
Sent: 05 January 2006 11:03
To: Javier Diaz
Subject: Re: Problems with indexes on Date/DateTime fields
Is not the second quary doing a full table scan? The
parser may find this better than using the Index.
--- Javier
Hi all
We are having a weird problem with some queries which are not using some
indexes in date fields.
Query-1
SELECT [field list] FROM tableX
WHERE dateField = [any date expression or constant value]
Query-2
SELECT [field list] FROM tableX
WHERE dateField <= [any date expression or constant