> I've got a simple guestbook application that holds 250 guestbooks so far.
> Some of the guestbooks are have up to 13000 records.
>
> I am returning the entire recordset and looping through it 20
> records at a
> time (I didn't think that it would get to be so big), but the query times
> out on 13000 records. The database (Sybase) is optimized like
> butter and I
> can hit it from 20 clients at the same time with no response problems. I
> would like to stay away from cursors, because the can get messy.
>
> I have already tried caching the query (which doesn't really help because
> there are always new records begin added) and converting it to a session
> variable (which doesn't help because it just eats the ram on the
> boxes), so I need to rewrite.
>
> Does any one have any suggestions or know if there is a custom tag out
> there that increments the number of records returned as you step through
> the result set? I have checked Allaires repository, but no luck :)
>
> If not, I will write one and share it with the group if anyone is
> interested.
Write the template intelligently so it's not bringing back 13,000 records
when you only need 20 - that's just insane!
The fastest way I can think of to do this is to find the last entry date,
bring back 25 just in case there are several at exactly the same time, and
pass through in the "next 20" button the date of the last entry and the IDs
of the entries shown on the previous page
That way your db access is kept to a minimum, and speed will shoot through
the roof
Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists