Hi there Pat!
> How should I approach the problem of selecting/lik'ing groups of
> 10 results with LIMIT? I want to get the effect of what search enines like
> altavista do on a search page I'm making that has a huge(well, large)
> database to search. I want to avoid displaying all matches.
> Anyone doing this out there?
LIMIT-works quite fine when showing results of relatively simple
queries with not so heavy loads on the server e.g.
On the first run:
SELECT * FROM thetable LIMIT 0,10;
On the second run:
SELECT * FROM thetable LIMIT 10,10;
...and so on..
However to minimize the load on the server you should not use this
technique when dealing with more complex queries or when you want
to optimize the performance due to high hit-rates. Instead you should
have an indexed result-table where you store the results of the query
after the initial call and which you then access using the result-ID
and LIMIT. Proper use of indexing is crucial when developing
performance-critical applications with large amounts of data.