Solved

What would cause a simple query to use tempdb after reindexing until you update statistics a second time?

Posted on 2014-11-10
3
140 Views
Last Modified: 2014-11-17
This is in regards to Microsoft SQL 2012 Enterprise.

Immediately after updating Indexes and statistics (Manually and also using Hallengren's scripts), several fairly simple queries start using tempdb heavily to the point that it severally impacts the entire SQL Servers performance. Avg. Queue depth goes from .25 to 5 in this state on the tempdb disk on a mirror set. The worst running query goes from a 2 second to 120+ second average run time.

In order to correct the problem we have to manually rerun update statistics on one specific table involved in those queries. I can schedule a second update stats to correct the effects, but would rather fix the root issue if I can identify it.

- Auto Update and Create Statistics are ON in the database. Asynch options are OFF
- No other tables seem to have the problem. (Assumption based on query performance and Tempdb usage)
- Indexes show low fragmentation on the table in question.
- After the second run of Update Statistics, the system operates as expected until the next re-indexing.

Does anyone have any recommendations on how to Root cause this? I have been Googling on this for several weeks now.

I'm hoping I have missed something obvious.

Thanks,
0
Comment
Question by:GracoIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 40433366
I faced this issue before, the resolution was to recompile all the stored procedures, which I have added at the end of my maintenance plan
0
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 500 total points
ID: 40433387
You don't want to update statistics on an index that has just been rebuilt, as you'll the stats will be based on fewer rows.

If you have a less-active time frame for that table, I suggest doing a full/100% statistics rebuild on that table during that time, and turning off auto-update stats -- but not auto-create stats -- on that table.
0
 

Author Comment

by:GracoIT
ID: 40433621
I'll give these a try individually tonight and test.

Thanks
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

739 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