SESSION vs database calls, Any concerns abotu overusing either? |
SESSION vs database calls, Any concerns abotu overusing either? |
kryles |
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. |
Pieman |
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.
|
Lo-Fi Version | Time is now: 25th April 2024 - 10:42 PM |