Hi,

I have a table with a DATE type column and I want to search for more records
that have the same year and month.

I have tried searching with:

select ... where date_format(date, '%Y-%m')='2005-06' ...;

I know that if I apply a function to the date column, the index on that
column is not useful and I have seen that this query works very very very
slow, even though I have defined an index on the date column.

Are there any other ways to create this query in order to make it work
faster?

Thank you.
Teddy



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to