Also you have a composite key on for the prymary key in tag_keys . ad_id should probably be a seperate index for "LEFT JOIN tag_ad_map tm2 ON tm1.ad_id = tm2.ad_id " to join well. The Index should be ignored because the left most portion of the the index is not used...
On 3/5/08, Rob Wultsch <[EMAIL PROTECTED]> wrote: > From a brief glance: > 1 * seems odd to me. Is this an attempt at some sort of cast? > "ORDER BY viktatantal DESC, RAND() > LIMIT 80" > How many results would this return without the limit. The ORDER BY RAND() > will never help a query. All the possible results have to be computed... > > Do you mean LEFT JOIN, or do you really mean INNER JOIN? If any of > those LEFT joins fail then the result is not excluded by the join. > until the where conditions come into play. > > I would rebuild the query with inner joins and the first table being t2, I > would then rerun the explain and consider composite indexes. > > Mysql is not know for self join tables well. > -- > Rob Wultsch > (480)223-2566 > [EMAIL PROTECTED] (email/google im) > wultsch (aim) > [EMAIL PROTECTED] (msn) > -- Rob Wultsch (480)223-2566 [EMAIL PROTECTED] (email/google im) wultsch (aim) [EMAIL PROTECTED] (msn) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]