Results 1 to 3 of 3

Thread: db lookups versus sessions

  1. #1
    Join Date
    Jan 2003

    db lookups versus sessions

    hello again all,

    i have another newbie question... is it better to do a lot of db accesses to reread data, or should i store things i grab from a db into a session object to allow it to transition to new pages...

    i could easily create a js object that represents some db record, read in the record from the db, and then store it in Session... i know that db accessing can be costly, but so can holding memory in the session (especially if i'm dealing with a large volume of objects coming from a db)...

    ack to memory usage!


  2. #2
    Join Date
    Jan 2003
    If you're talking about some main fields like key fields and the username and userlevel, I'd vote for session variables.
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

  3. #3
    Join Date
    Dec 2002
    I will not suggest you to use Session objects to store bulk amount of data. If it is 2-5 small key values you want to be available on each page then you can use Session objects but if it is a bulk data and you do not require that on each and every page then better to use database communication that time. MEMORY is more expensive then database connections.
    Vishal Gupta

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles