The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> SESSION vs database calls, Any concerns abotu overusing either?
kryles
post Feb 12 2008, 08:45 AM
Post #1


Novice
**

Group: Members
Posts: 21
Joined: 30-November 07
Member No.: 4,437



Hi,

I am making a small page for "customers". I have a table holding all the customer info. Obviously when the customer logs in I put their ID in a SESSION variable.

Now to access customer details (first name, last name, address etc etc), is it better to keep connecting to database and making calls or carry over all the info in SESSION variables (maybe even a bunch of hidden fields?)?

I would think there is quite a bit of over-head with all the potential database connections/requests etc but I'm not sure how much a SESSION variable can bog down a page (or how much a bunch of hidden fields would bog it down).

Think about the table having around 700,000 records, and if I use SESSION variables/hidden fields there would be around 10 or 15.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Pieman
post Feb 15 2008, 04:31 PM
Post #2


Member
***

Group: Members
Posts: 43
Joined: 10-February 08
Member No.: 4,927



Well depends on the importance of the data really, if it is important then do not put it in a session, not unencrypted anyway. Other wise you can just put it in a session. But it shouldn't really make a big difference in performance.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 05:58 AM