It is difficult to say without knowing more. It would be helpful if you'd show us the queries, as well as what EXPLAIN <http://dev.mysql.com/doc/mysql/en/EXPLAIN.html> has to say about them. Your table structure may also help.

I will say that most queries I've seen posted here which used DISTINCT could have been written more efficiently without DISTINCT. Without seeing your queries though, I'd be foolish to speculate.

Michael

Jim McAtee wrote:
I have a web application using MySQL 3.2x server. In the application theres an HTML form used for searching an ISAM table of about 500k records. To populate select (drop down) fields in the form I do a couple of SELECT DISTINCT queries against this table.

What's the best indexing strategy to speed up these queries? I've added indexes for both of the fields on which I do a SELECT DISTINCT. It seems to have helped a little, but the queries are still fairly slow.

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



Reply via email to