Click here to Skip to main content
14,493,424 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi All,

If i store 1Lac of record in the Session and the application is used by 20 people, wont i get performance issue ?
Posted
Comments
[no name] 27-Oct-15 7:26am
   
Storing more data in Session is not good idea. It will degrade your performance. I am not sure why do you want put 1 lac record in session please describe it. Instead if you have have cache server you can use it.
sheelarose 27-Oct-15 8:18am
   
Thank you for your valuable comments
sheelarose 27-Oct-15 8:21am
   
I have Lacks of records in DB. I need to search the record by account number. Each and every time i cant go to DB and fetch record. Since it will make some performance issue. So i m planning to use Session variable, which will store Lacks of record and using LINQ query , I m planning to get the account details.
[no name] 27-Oct-15 9:27am
   
In that scenario you use look up concept. Store data in a file(xml) file and retrieve record as per your account number using LINQ query.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Of course, there will be a performance hit.
Generally, it is a very bad idea. Why would you want to store that big size of data in session. If you want to know more about the session size limit, see this thread



http://stackoverflow.com/questions/1755348/what-is-the-maximum-size-a-session-variable-can-hold[^]
   
v2
Comments
sheelarose 27-Oct-15 8:21am
   
I have Lacks of records in DB. I need to search the record by account number. Each and every time i cant go to DB and fetch record. Since it will make some performance issue. So i m planning to use Session variable, which will store Lacks of record and using LINQ query , I m planning to get the account details.
John C Rayan 27-Oct-15 8:25am
   
I can see what you are trying to do. You have to do some testing before taking a decision. Is the production server capable of handling 1 Lac records without affecting overall performance? Can you cache them rather than keeping them in session if is application wide and not session specific?
sheelarose 28-Oct-15 2:00am
   
Can we use application variable ?
John C Rayan 28-Oct-15 6:07am
   
You can use but I would prefer Cache. Search for the the difference between Application State and Cache. Cache is better because it is more flexible and application variable will hurt the web server
sheelarose 30-Oct-15 2:58am
   
Ok. than we can go ahead with cache.
John C Rayan 30-Oct-15 5:21am
   
Good!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100