> 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')
> 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)
> 

What keys you have? Search through cdate, if it is not
a key may take a while.

Mikalai

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

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

Reply via email to