MySQL Forums
Forum List  »  Performance

Re: Performance of Dependent Subquery
Posted by: KimSeong Loh
Date: October 24, 2004 08:06PM

I don't know why.

But, from the 2 EXPLAIN results, both queries choose to use different index.
Query 1 uses index (week) and expect to get 48034 rows
Query 2 uses index (ObjectID) and expect to get 2009 rows.

So, 1 possible explanation is that MySQL unables to decide properly which index is better in Query 1 due to the subquery. You can try to force MySQL to use index (ObjectID) in query 1 and becnhmark it.

Options: ReplyQuote


Subject
Views
Written By
Posted
3649
October 22, 2004 08:24PM
Re: Performance of Dependent Subquery
2376
October 24, 2004 08:06PM


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.