Link to home
Start Free TrialLog in
Avatar of cycledude
cycledudeFlag for United Kingdom of Great Britain and Northern Ireland

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?
Avatar of Easwaran Paramasivam
Easwaran Paramasivam
Flag of India image

Implement Cache mechanism. You did not mention that is windows or web application?

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.
>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?
SOLUTION
Avatar of APoPhySpt
APoPhySpt
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cycledude

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...
thanks