I believe this was talked about a couple of months back and some people suggested using a method of selecting not only max rows but to find do a hack to get the start row by using the IN keyword to somehow filter out the ones for the pages you're already past. That would do it on the DB side instead of passing the whole dataset to CF and then using the startrow and maxrows attributes of CF. May want to search the archives.
John Burns Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. | Web Developer -----Original Message----- From: Jordan Michaels [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 1:49 PM To: CF-Talk Subject: Re: DB Pagination Question Jim Curran wrote: >what is the most efficient way to paginate through the results, without >hogging memory or re-running the entire query for each page view? > > Unfortunately, I believe those are your only two options. You either cache the query into resident memory (memory hog) or you run the query at each request. You can do little things like adding the "MaxRows" attribute to your query (which will lessen the amount of memory used per query), or using views instead of joins (to improve query speed), but I know of no other way to accomplish what you're trying to do then with query caching or a query on every page. HTH! -- Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Blue Dragon Alliance Member [EMAIL PROTECTED] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236255 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54