Author |
Topic |
|
e3stone
Average Member
USA
885 Posts |
Posted - 10 August 2002 : 05:03:07
|
If we were to store session values in a temp table in the database, wouldn't this be more efficient than using session variables? I had thought of this and then read a blurp about it on this website: http://www.sql-server-performance.com/asp_sql_server.asp (about halfway down) I did a search on this forum and I couldn't locate a topic about it. I'm sure it's been spoken of before, though. Are there any +'s or -'s to this technique (as long as connection pooling is properly done)? I noticed that IdealBB does this (at least it looks like they do) |
<-- Eric --> |
|
Deleted
deleted
4116 Posts |
Posted - 10 August 2002 : 06:51:07
|
I think the keyword on that link is "retreive it later when needed". If you are using the info on every page (like the quick JumpTo select data in v3.4) the performance loss will be much higher.
Similar idea was used in Active Users MODs (I only know v3.x) and was creating stress on database if there a lot of users online. You also need to implement "session expiration" there.
E.g. a shopping cart is much less dynamic than a forum. Also a shopping cart may need to save the data anyway...
(Hey, include signature is turned on by default :)
|
Stop the WAR! |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 10 August 2002 : 14:26:00
|
Actually, I was just discussing this with Frutzle yesterday. All the queries for logging a user in and grabbing spacific info about that user could be eliminated for every page load except the very first one, thats about 5 queries if i'm not mistaken, just by storeing the seesion state in a TABLE_SESSIONS table. Which can double as an active users table.
And I dont mean "Retreive latter when needed" I mean retrive it all at the top of every page, just like it is now, but with only one query not 5. |
Nathan Bales CoreBoard | Active Users Download |
|
|
Deleted
deleted
4116 Posts |
Posted - 10 August 2002 : 15:25:01
|
Because this info is only available when the server is online, i.e. no need to store it into database, you even can use the application variables for this purpose. Especially if you don't keep unnecessarily large info on every user.
This way you can drop the number of database calls to zero.
As you know, application variables can also keep arrays, and are much more speedy than database calls, although a lot slower than using simple variables.
|
Stop the WAR! |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 10 August 2002 : 15:45:27
|
You load up that application object with 300 active sessions and your servers gonna be crying "M.M.Momma!" |
Nathan Bales CoreBoard | Active Users Download |
|
|
Deleted
deleted
4116 Posts |
Posted - 11 August 2002 : 01:00:26
|
Exactly ! But I was not talking about complete sessions...
One more reason to use database on large scale sites can be the pre-dot-NET issue of clustering...
|
Stop the WAR! |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 11 August 2002 : 01:59:27
|
Thats a good point, Classic ASP sessions don't function in clusterd environments. |
Nathan Bales CoreBoard | Active Users Download |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 11 August 2002 : 02:49:56
|
quote: Originally posted by Nathan
Thats a good point, Classic ASP sessions don't function in clusterd environments.
They do using Session Affinity but that can have a negative impact on the Load Balancing. |
Kiwihosting.Net - The Forum Hosting Specialists
|
|
|
|
Topic |
|