Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Inconsistent performance on views
Inconsistent performance on views
Rate Topic
Display Mode
Topic Options
Author
Message
Damon Falconi-345992
Damon Falconi-345992
Posted Monday, September 24, 2012 8:04 AM
SSC Rookie
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 2:31 PM
Points: 31,
Visits: 232
We're running SQL Server 2008 R2 and the views in question are not indexed.
Originally the SELECTs against the views ran less than a second.
But, after a period of time (about 10 days), the performance on the views degrades to 50-60 seconds.
The server is very active and the underlying tables are updated frequently;
so there is some index fragmentation during the week but we we are doing weekly reorgs,
and that doesn't look like the issue.
However, IF we just recreate the view, performance returns to the sub-second range again
- and remains there... until the next time.
Can someone explain what may be happening?
Post #1363502
Grant Fritchey
Grant Fritchey
Posted Monday, September 24, 2012 11:11 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 6:02 AM
Points: 13,382,
Visits: 25,177
It sounds like you might be experiencing bad parameter sniffing... possibly. Recreating the view forces a recompile of the plan. If your statistics are aging over the week, but not enough to force a plan recompile, entirely possible, you may see the type of behavior you're seeing. Forcing a scheduled recompile on the plan is one possible solution. You could also try manually updating the statistics.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #1363638
Damon Falconi-345992
Damon Falconi-345992
Posted Monday, September 24, 2012 11:56 AM
SSC Rookie
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 2:31 PM
Points: 31,
Visits: 232
Thanks, I'll see if I can hone in on the issue.
Post #1363662
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.