Yes, the startRow
and endRow are only query record pointers, you have still queried the full
dataset. If your DB server supports cursors, you can use them to get
rows from X to Y, but they are a pain to work with. I would suggest doing your
full dataset query for primary keys only, then follow it with your data query
grabbing only records with PKs from the desired range. However, with a 250
record window, your probably reaching the middle ground between equal
performance with the standard approach.
Daniel
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Kevin Fricke
Sent: Wednesday, September 07, 2005 3:07 PM
To: CFLIST
Subject: sql limitFirst of all, I assume that limiting the number of records will be much faster in the query than in the cfoutput, correct? If you do the 'ol startRow and endRow, isn't it pulling all of the records anyway.Second, if this is the case, what is the best way to handle the next, previous, etc. I ask because the table that I am pulling from has hundreds of thousands of records and I only want 250 at a time.
Thanks,Kevin
