Caching a recordset

Results 1 to 4 of 4

Thread: Caching a recordset

  1. #1
    Smad Guest

    Default Caching a recordset

    I am using a recordset to retrieve on each page 3 random records from an Access db. The queried table has 16 rows with 3 records. I am trying to speed up the website a little and I was wondering how can you cache the recordset and if that is possible, how to to it. I am kind of a ASP newbie so... explain good<BR><BR>Thank you very much<BR>Smad

  2. #2
    Heaven's Martini Guest

    Default Why recreate the wheel

    Well,<BR><BR>Personally, I don&#039;t know how to cache a recordset.<BR><BR>But why not use GetRows or GetString?<BR><BR>They are MUCH faster than using a recordset.<BR><BR> has a decent read on using getrows. <BR><BR>its worth it to learn, once you know how to do it, using a recordset goes out the window for the most part.

  3. #3
    Join Date
    Dec 1969

    Default Let the DB engine do the caching...

    It will do it automatically, keeping any "HOT" tables in memory so that the query time is minimal, using all in-memory data.<BR><BR>If you cache the tables (which is what you are *really* talking about here) for each user, you just multiply the amount of memory being eaten up.<BR><BR>EXCEPTION: *IF* you are using the same *CONSTANT* records that are either never or very seldom updated, then it *WOULD* be a good idea to store the recordset (probably as an array...see ADODB.RecordSet.GetRows) as an *APPLICATION* variable. See? Many users now have simultaneous access to the same data. *THAT* is worth caching. But not one table per user.<BR><BR>

  4. #4
    arun raj Guest

    Default RE: Caching a recordset

    like mr. wilkinson said using an application variable is a good way , another approach could be to create an xml file with these records and use it everytime, of course this all depends on whether ur data changes often, if not u can use file i/o as it is always faster than reading from a database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts