Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have to methods
1. One is Ready to insert to database
2. Another one is Get all records from database to verify the newly inserting data is existing or not (to elidate)
3. For that i need to avoid the response time which has the 100000 records to validate for newly inserted data.
4. The page is loading because of time consuming
5. Could you please suggest what is the best approach to reduce the laoding time.

What I have tried:

I have tried asyn and wait but not able to reduce the time of getting and validating the 100000 records from database.
Posted
Comments
CHill60 5-Dec-17 8:36am    
Index the tables
DGKumar 5-Dec-17 9:07am    
Hi Thank you for your valuable response
Currently i am validating the newly added record values are existing or not in current table for that lot of users will log in at that time suppose multiple users will login then the same method will fetch the data from same database.
So what is the best approach to avoid that.
Richard Deeming 5-Dec-17 9:48am    
Don't try to load all 100000 records just to verify whether a single record exists. Use a WHERE clause[^] to load only the data you're looking for.
David_Wimbley 5-Dec-17 12:11pm    
It may or may not be advisable to do this depending on your situation but, assuming you are using entity framework, you could turn off change tracking and see some performance increase there.

turn off change tracking

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