Search code examples
asp.netsessionsession-management

Pitfall of storing dataTable(10,000 rows) in a session variable?


Consider my dataTable contains 10,000 rows and i want to know the pitfall of storing datatable in a session variable... I want to use it until a new row has been added...

What type of session mode should i use?


Solution

  • Never do that, its not recommended.. It affects the performance if your server has low memory and busy processing times.

    Before proceeding with this you need to consider

    1. is your server got a available memory?
    2. How busy your server is?
    3. Whether the data you goin to put in session will be shared across among multiple user requests?

    Why do you want to store that much data into an session.Probably you might be doing this for pagination (in a datagrid i assume), then you have to reconsider your design.