MySQL Forums
Forum List  »  Optimizer & Parser

Re: Make optimized LEFT JOIN with GROUP BY
Posted by: Jerry Potokar
Date: May 03, 2006 04:17PM

More wierd things... I used my original query with all the validirano=1 and other tiny int (0 or 1) and know what? I used an index just on datum, ID and it works very fast. I didn't make an index of validirano, jezik, datum, ID... Seems it doesn't matter. Now it shows there is index

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE recepti range recepti_sort recepti_sort 9 NULL 5856 Using where
1 SIMPLE receptislike ref receptislike_idx receptislike_idx 4 kulinarika.recepti.ID 1

Ok, reference is null, I don't know why, but phpmyadmin shows that the query took 20ms now, instead of 200. So I guess I shouldn't bother...

Options: ReplyQuote

Written By
Re: Make optimized LEFT JOIN with GROUP BY
May 03, 2006 04:17PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.