Hello, I am relatively new to MySQL though I have database experience. I have a query that doesn't seem to want to use an index for the first table despite my indexing several fields. Before I get too far in the details of the query, here is what EXPLAIN SELECT tells me for the first table of the LEFT JOIN:
type=ALL possible_keys=NULL extra=where used; using temporary; using filesort I found a reference that usage of a temporary table "...typically happens if you do an ORDER BY on a different column set than you did a GROUP BY on." This is the case as my ORDER BY uses two columns while I group on one. Does that preclude the use of an index? Also, my first table has about 65 rows, and about 95% are used for the query (as limited by a WHERE condition), though any number of rows will be returned. Given that is the case, would that prevent MySQL from using an index? Or does it even matter with a table this size? For the record, it's the second table that has several thousand rows, and MySQL uses an index for that table in this query. - Steve Yates - if (stone != rolling) moss++; ~ Taglines by Taglinator - www.srtware.com ~ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php