|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Rob Wultsch (wultsch
gmail.com)
Date: Wed Mar 05 2008 - 10:10:45 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <wultsch
gmail.com> 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
> wultsch
gmail.com (email/google im)
> wultsch (aim)
> wultsch
hotmail.com (msn)
>
--
Rob Wultsch
(480)223-2566
wultsch
gmail.com (email/google im)
wultsch (aim)
wultsch
hotmail.com (msn)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]