Click here to Skip to main content
15,907,396 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having a database with approximate 9000-10000 records. This records may increase in future. I need to do frequent filtration on this records. So i am planning to use DataView for that. So my question is that, is it good practise to keep large DataTable in Cache? So that i can easily access records without reopening database connection and do filtration on that using DataView. Or is it any better option to do filtration of these records?

Thanx in advance....
Posted
Updated 5-Mar-13 17:47pm
v2
Comments
Avik Ghosh22 4-Mar-13 23:58pm    
a DataSet represents a set of DataTable objects. More often than not, it will just contain one table, but if you do a query with multiple SELECT statements, the DataSet will contain a table for each. Because this is an in-memory representation, you have to be careful about how much data you pull into a DataSet. You can "Fill" a DataSet using the Fill method of a DataAdapter.

a DataView is like a virtual subset of a DataTable.

according to me use data set...
vishal.shimpi 5-Mar-13 0:15am    
Yes, you can store data in cache but you will not get updated record, assume you have accessed data and store in cache memory and after that some has update perticular record then at that situation u will not get the updates..
Mit Mehta 5-Mar-13 23:46pm    
Thanks vishal.shimpi,
Actually i don't have to worry about updated records. It is ok if i don't get updated records because these records are not updated by end user. End user can only view data.
Sebastiaan Meijerink 12-Mar-13 17:06pm    
I've had 100.000+ records in cache without problems. Obviously you can over do anything, but as long as they are static records e.g. they don't change.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900