Mustafa Yalcin Acikyildiz wrote:

hello.
i have a speed problem ;).

table:
title_id bigint(50),title char(200), cdate datetime

query:
select title, max(cdate) as mdt, count(title_id) as num
from entry

where (date_format(cdate, '%Y-%m-%d %H:%i:%s')

The function in whre clause forces a full table scan.
try
where  ( date between 20040507000001 and 20040508235959 ) and ...

between '2004-05-07 00:00:01' AND '2004-05-08 23:59:59')
and
(on = 'Y')
group by title
order by mdt desc
limit 0,25

(have 400000+ records in table, server result: 3.0547 second)






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



Reply via email to