In the last episode (May 03), Mikhail Berman said:
> Thank you, Chris 
> 
> But the table is indexed on the field you are referring to and the other
> one the query, which is evident from this:
> 
> >   KEY `prdadadx` (`price_data_date`),
> >   KEY `prdatidx` (`price_data_ticker`)

These are two separate keys, though, and your query is doing a GROUP BY
across both fields, so neither of those keys would be useful (mysql
would have to do a random record lookup for each row to fetch the other
field).  Try an index on (price_data_ticker, price_data_date).  Since
your query only references those fields, mysql should be able to return
your results just by scanning the index.

-- 
        Dan Nelson
        [EMAIL PROTECTED]

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

Reply via email to