Sessions vs. Database
Posted: Thu Jan 12, 2006 1:29 pm
Hello everyone 
Could you please tell what is more preferable: to store user information in session after retrieving it once from database or to send queries to database server every time this information is needed. The problem is that the retrieved (and then stored) information can be relatively large (1500-2000 records, each contains integer values, or possibly strings). The data is requested very often. The query that retrieves data is quite complex and it uses table joins. There might be many tens of thousands of users (or even hundreds) and also tens of thousands might be using web-service at the same time.
What can you say about the productivity and speed of both methods? Thanks
Could you please tell what is more preferable: to store user information in session after retrieving it once from database or to send queries to database server every time this information is needed. The problem is that the retrieved (and then stored) information can be relatively large (1500-2000 records, each contains integer values, or possibly strings). The data is requested very often. The query that retrieves data is quite complex and it uses table joins. There might be many tens of thousands of users (or even hundreds) and also tens of thousands might be using web-service at the same time.
What can you say about the productivity and speed of both methods? Thanks