Re: [CDBI] Make CDBI go fast
"Perrin Harkins" <[email protected]> Wed, 21 Mar 2007 10:17:51 -0400
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
On 3/21/07, Brad Bowman <[email protected]> wrote: > Does MySQL sort the entire file to get the first 11? Do other databases? It's not possible to know what the first 11 are without sorting them at some point. Most databases, including MySQL, use indexes to speed up sorting when possible. In the best case, this amounts to pre-sorting the results. The filesort only happens when MySQL is not able to find an index it can use for the requested sort order. - Perrin