Re: Slow LIMIT Query

2005-06-06 Thread mfatene
Hi Doug, with a desc index on stuffed_date, an optimiezd table, the query runs in : mysql> select * from stuff order by stuffed_date desc limit 18,10; +---+--+ | id| stuffed_date | +---+--+ | 88233 | 2005-07-08 | | 88228 | 2005-07-08 | | 88218 | 2005-07-0

Re: Slow LIMIT Query

2005-06-06 Thread Felix Geerinckx
On 05/06/2005, "Doug V" wrote: > In your followup message [from [EMAIL PROTECTED], you mention reverse > sorting the query. I imagine on the application side I would need to > reverse sort again to get the correct order. Are there any other ways > to speed up such a query? I find similar beha

Re: Slow LIMIT Query

2005-06-05 Thread Doug V
Hi, I have tried to simply the problem and it exists without any JOINs. have you given the query ? SELECT id FROM stuff ORDER BY stuffed_date DESC LIMIT 18, 10 -> .43 sec SELECT id FROM stuff ORDER BY stuffed_date DESC LIMIT 0, 10 -> .0007 sec have you described your tables ? stuffed

Re: Slow LIMIT Query

2005-06-05 Thread mfatene
But i give you a suggestion (theoritical) : if data are reverse sorted , LIMIT 18, 10 will be LIMIt 2, 10 who knows ? Mathias Selon [EMAIL PROTECTED]: > Hi, > i and i think all people will think the same : i can't help. why ? > > have you described your tables ? > have your given the si

Re: Slow LIMIT Query

2005-06-05 Thread mfatene
Hi, i and i think all people will think the same : i can't help. why ? have you described your tables ? have your given the size of each table ? have you list the indexes ? have you specify the storage type ? and have you given the query ? if you're looking for just a theoritical response, docs.m