MySQL Forums
Forum List  »  Optimizer & Parser

Re: how to optimise query for 10+ millions records
Posted by: Azhar Rahi
Date: February 14, 2012 02:33AM

@irek .. These two tables are temporary tables, which are created when someone pass comma separated value to the stored procedure. This comma separated string is then converted to temporary tables. So I cant turn its field 'value' constraint to P.K.

One more thing, I have applied some indexes, so now a situation is little changed.
When I give two different dates for Between clause i.e. 2012-01-27 and 2012-01-28, it runs fine with "using where" only; even if I give 2012-01-27 and 2012-01-29 and so on, it runs perfectly with "using where". But when I give the same date i.e. 2012-01-27 and 2012-001-27 for between clause, it returns the records with "using temporary; using filesort"

Also when it returns records only with "using where", still it is taking more than a minute to retrieve the record which is a little irritating. Because I want to return the record max in 20-25 seconds.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: how to optimise query for 10+ millions records
1287
February 14, 2012 02:33AM


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.