Solved

MS SQL Query Loading/Timeout Question

Posted on 2014-03-10
2
878 Views
Last Modified: 2014-03-11
We have a database that holds some sales records in it, and we recently changed from MS SQL Server 2008 to MS SQL Server 2012.

We noticed every morning we get a "timeout" error in our software when it's loading the Sales Order info for the first time in the day.

I then did a query for the entire table in MS SQL Server Management Studio on the server holding the DB and it took about 3 minutes to return all of the data.

After this query - the program running on the network runs fine and has no "timeout" issues - we are then fine to run the program the rest of the day without any issues...but then if we don't run the query in the morning the next day it give the timeout error again.

This DB is important but not critical, so we won't spend a ton of time on this issue, but if anybody has a quick fix that can suggest so we don't need to run that query in the morning that would be excellent.

Thanks
0
Comment
Question by:ProdigyOne2k
2 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
Comment Utility
I will go out on a limb and suggest that you have never updated your stats and perhaps have never re-indexed your tables.
0
 

Author Closing Comment

by:ProdigyOne2k
Comment Utility
Anthony's answer helped, but the other issue was that the DB was on an SSD previously, and this time put on a 5400RPM HDD.  It is now loaded on an SSD and takes seconds to load.
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now