| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Donny Simonton | Date: | September 4 2004 12:59pm |
| Subject: | RE: please explain why this query isn't optimized | ||
| View as plain text | |||
The other simple solution is to do something like this. Select changed FROM archived_stats order by changed DESC limit 0,1 I haven't actually tried it, it may be just as slow. If you always know that you have dates in the changed for the past week or past day, this may be an even better solution for you. Select changed from archived_stats where changed > DATE_SUB(NOW(), INTERVAL 1 DAY) order by changed DESC limit 0,1 Hope this helps. Donny > -----Original Message----- > From: Dave Dyer [mailto:ddyer@stripped] > Sent: Saturday, September 04, 2004 2:58 AM > To: Dan Nelson > Cc: Donny Simonton; mysql@stripped > Subject: Re: please explain why this query isn't optimized > > > > > >> Getting the same answer, from a simpler query, in infinitely > >> less time, just seems wrong to me. > > > >Makes perfect sense. Simpler queries *are* easier to optimize, you > >know :) > > > Makes perfect sense. Thanks, I think the relevant points > have been covered. >
| Thread | ||
|---|---|---|
| • please explain why this query isn't optimized | Dave Dyer | 4 Sep |
| • RE: please explain why this query isn't optimized | Donny Simonton | 4 Sep |
| • Re: please explain why this query isn't optimized | Eric Bergen | 4 Sep |
| • RE: please explain why this query isn't optimized | Dave Dyer | 4 Sep |
| • Re: please explain why this query isn't optimized | Dan Nelson | 4 Sep |
| • Re: please explain why this query isn't optimized | Dave Dyer | 4 Sep |
| • RE: please explain why this query isn't optimized | Donny Simonton | 4 Sep |
| • Re: please explain why this query isn't optimized | Egor Egorov | 6 Sep |
| • Re: please explain why this query isn't optimized | Bill Easton | 6 Sep |
| • Re: please explain why this query isn't optimized | David T-G | 7 Sep |
| • Re: please explain why this query isn't optimized | Egor Egorov | 7 Sep |
| • Re: please explain why this query isn't optimized | Egor Egorov | 7 Sep |
