As I understand it (with mySQL at least) using large LIMIT offsets,
will always be quite slow, basically as it still as to run the query
and then basically disguard the early matches until the 'limit window'
You should perhaps look at other methods of 'paging', if you really
are paging though the results you know the last population on the last
page, so can do something like
SELECT * FROM `places` WHERE (`places`.`country_id` = 'BR') and
population < 10000 ORDER BY places.population DESC LIMIT 10
its not perfect, but often you may be able to sacrifice accuracy for speed.
The other option is to look at something like SphinxSearch - its a
full-text engine, but would probably manage this quite well, as it can
do sorting and grouping much like mysql. Note its not a database, so
you would still need to use it in conjunction with (say) mysql. I
havent used it with such large offsets, but suspect it might be better
than venila mysql. I have the geonames dump indexed in sphinx, perhaps
I could actully give it a try!
2008/12/23 Avishai <
avisha...@gmail.com>:
--
Barry
-
www.nearby.org.uk -
www.geograph.org.uk -