Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Work Files / Min Increased almost 10 fold.


Work Files / Min Increased almost 10 fold.

Author
Message
dave-L
dave-L
SSC Journeyman
SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)

Group: General Forum Members
Points: 80 Visits: 245
Hello. I was making some minor changes to indexes the other day. The next day I noticed our Work Files Per Minute counter for the instance I was working on had jumped from about 20k to 175k. Looking at historical data, this counter has always been down around 20k and the jump occured at the exact time I was making changes to indexes.

I kept a log of the "major" index changes I made, and I have undone time, but to no avail: the counter is still north of 150k, always.

I understand Work Files per Minute are generated from hash joins, which I most certainly could have affected by changing indexes around.

Is there a way for my to track down which query plans are generating the increased number of hash joins, or some how see what exactly is creating these work files?

Thanks!

-DaveL
Andreas.Wolter
Andreas.Wolter
SSC-Enthusiastic
SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)

Group: General Forum Members
Points: 155 Visits: 1056
dave-L (9/15/2013)
...
Is there a way for my to track down which query plans are generating the increased number of hash joins, or some how see what exactly is creating these work files?...


You sure can check the plans in cache, and search the XML for "Hash Match" occuring.
This might give you a start
SELECT  * FROM sys.dm_exec_cached_plans AS dm_exec_cached_plans
CROSS APPLY sys.dm_exec_sql_text(dm_exec_cached_plans.plan_handle) dm_exec_sql_text
CROSS APPLY sys.dm_exec_query_plan(dm_exec_cached_plans.plan_handle) dm_exec_query_plan


you can then use the nodes function to serach the XML from the plan

Andreas

---------------------------------------------------
MVP SQL Server
Microsoft Certified Master SQL Server 2008
Microsoft Certified Solutions Master Data Platform, SQL Server 2012
www.insidesql.org/blogs/andreaswolter
www.andreas-wolter.com
Erland Sommarskog
Erland Sommarskog
SSC Eights!
SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)

Group: General Forum Members
Points: 931 Visits: 866
When you add an index on a table, all query plans for that table are flushed from the cache and the queries are recompiled. If you have queries on the pattern "give me all that happened today", it is not unlikely that statistics will say "there is nothing today", why SQL Server will choose a plan from that. But unfortunately, you have a million rows for today.

So updating the statistics for the concerned tables can help. Then again, it is necessarily the statistics on the concerned tables that are out of whack.

Since searching the query plans for hash joins requires a lot of XQuery, I would be lazy and look in dm_exec_query_stats to find querys with a lot of physical IO. Preferably by sampling some hours apart and compute the delta.

Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search