-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 Diaz
if that 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
using
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
]
Are valid for the equivalent
DELETE FROM TABLE-X WHERE [CONDITIONS]
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
Javier Diaz wrote:
EXPLAIN SELECT * FROM process_times
WHERE date = date_sub(now(), INTERVAL 2 day)
possible_keysdate_idx,date_proc_idx/possible_keys
key(NULL)/key
rows10778561/rows
EXPLAIN SELECT * FROM process_times
WHERE date = date_sub(now(), INTERVAL 2 day)