Depends on the language you are writing in and the acceptable latency of the
user.

If you are writing in PHP or another scripting language for a web based
application where the server will have to artificially preserve stat then I
would not attempt to cache the recordset, I would get a new one each time.
This has the added advantage of always serving the freshest data.

If you are using a more traditional language  that will be running on the
client's desktop and is stateful AND the user can accept the fact that the
data may have changes since they first requested it then I would cache the
recordset on the client side. This has the advantage of only going to the
server once per client instead of once per page.  However, depending on how
often your data changes, it is possible that the data will change after the
user requested the recordset but before they view the data.

HTH,
=C=

*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-----Original Message-----
From: forum mail [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 2:30 AM
To: [EMAIL PROTECTED]
Subject: paging of records.. any suggestions?


Hi list,

I would like to get any suggestion on how i can go about my
problem the most efficient way.

I have a program that reads the log file and displays it for
the user. At the moment, it retrieves all the data in mysql
database. I would want to add paging capabilities to it. I am
wondering what would be advisable... to make a database query
every time I change page, or do a one time data retrieval and
just store it in temporary variable(probably session or class)
and access it from there.  What will take more time and
resources? repeated access to DB or storing all the records in
a temporary var/class?

what would be the best to use in my SELECT statement to
retrieve only a certain number of record (from record 1 to
record n and so on). This may be basic.. im relatively new in
this..

Any input will be appreciated.



TIA

________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to