cycledude
asked on
querying a list of classes
Hi
I have an application that is working, but an operation which is querying a database many times, is performing slowly.. so I need to alter the code to work from memory rather than the database.
I am loading the required data into a list of classes, for sake f example the class contains data for employees.
What I need to do is pull a set of data from the list, as if I was querying a database... for example, I would like to extract a new list which contains all employees with the surname 'Jones'
How can I do this?
I have an application that is working, but an operation which is querying a database many times, is performing slowly.. so I need to alter the code to work from memory rather than the database.
I am loading the required data into a list of classes, for sake f example the class contains data for employees.
What I need to do is pull a set of data from the list, as if I was querying a database... for example, I would like to extract a new list which contains all employees with the surname 'Jones'
How can I do this?
>but an operation which is querying a database many times, is performing slowly..
>so I need to alter the code to work from memory rather than the database.
hmmm, I would first check if the query could not be tuned ...
often, just a little small index will work terribly good.
do you have some details?
>so I need to alter the code to work from memory rather than the database.
hmmm, I would first check if the query could not be tuned ...
often, just a little small index will work terribly good.
do you have some details?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
HI
Sorry i was in a rush when typing the question... It is a c#2010 winforms application, connecting with an access database.
I figured that LinQ would be the way to go...
Sorry i was in a rush when typing the question... It is a c#2010 winforms application, connecting with an access database.
I figured that LinQ would be the way to go...
ASKER
thanks
However please do refer below links:
http://www.codeproject.com/Articles/12097/Cache-Management-in-ASP-NET
http://www.codeproject.com/Articles/7670/How-to-use-data-caching-in-a-NET-Windows-Forms-app
If you want use SQLite. Refer: http://www.sqlite.org/sharedcache.html
However increasing SP performance would always help you.