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.
Subject
Views
Written By
Posted
2980
February 09, 2012 03:30AM
1727
February 09, 2012 05:31AM
1391
February 09, 2012 05:38AM
1299
February 09, 2012 05:58PM
1273
February 11, 2012 11:26PM
1528
February 12, 2012 10:12PM
1381
February 13, 2012 02:18PM
Re: how to optimise query for 10+ millions records
1593
February 14, 2012 02:33AM
1388
February 14, 2012 07:24AM
1406
February 15, 2012 07:30AM
1858
February 16, 2012 03:54AM
1293
February 17, 2012 01:20AM
1253
February 17, 2012 03:57PM
1531
February 17, 2012 05:12PM
1338
February 18, 2012 07:18AM
1397
February 21, 2012 03:25AM
1392
February 24, 2012 10:45AM
1336
February 20, 2012 02:21AM