Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
we are developing application for retail shops.For the first transaction saving takes 2 to 3 seconds. second transaction on wards it takes < 1sec. The problem is when my system is idle for 10 or 20 minutes again first transaction takes 2 to 3 secs. we are using wpf front end and sql server 2008 database. Getting and sending data from/to the database through XML
Posted
Updated 21-Sep-14 21:40pm
v4
Comments
Sergey Alexandrovich Kryukov 22-Sep-14 4:00am    
Why do you think your information can help to solve your problem? You told us next to nothing. Performance depends on many factors...
—SA
PhilLenoir 22-Sep-14 10:01am    
Please give examples of your query. Have you considered using a stored procedure for the query? The symptoms sound like a query plan being cached and then dropped for a complex query. With a stored procedure the query plan will be held in cache more reliably than an ad hoc query. You can also read up on query hints to short circuit some plan decisions and SQL query performance troubleshooting. A rule of thumb: the more indexes you have, the faster the reads and the slower the writes. Index all fields where you are filtering or joining and use transactions if this affects batch writes.

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