in reply to memory usage

Another option w/r/t the next-previous buttons is that you can ask for certain ranges of records, using the LIMIT keyword in your SELECT statement. For example:
select id, name from businesses limit 1000
will give you the first 1000 records. If you then want the next 1000, you can use this:
select id, name from businesses limit 999,1000
Start at 999 (the offset of the first record is 0, I believe), give me 1000 records.