﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Grant Fritchey / Article Discussions / Article Discussions by Author  / SSC Clinic: Finding the rogue query / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 05:35:01 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SSC Clinic: Finding the rogue query</title><link>http://www.sqlservercentral.com/Forums/Topic1358350-217-1.aspx</link><description>Good article.</description><pubDate>Tue, 25 Dec 2012 08:41:49 GMT</pubDate><dc:creator>Neha05</dc:creator></item><item><title>RE: SSC Clinic: Finding the rogue query</title><link>http://www.sqlservercentral.com/Forums/Topic1358350-217-1.aspx</link><description>[quote][b]OceanDeep (9/13/2012)[/b][hr]Where are those analysis pages coming from?  Is it a feature in SQL activity monitor?  If so, please advice the proper steps to do what you show.  If you are using a tool to build sll that, let me know what u use.[/quote]It's all from Red Gate SQL Monitor. You can see it in action against SQL Server Central here at [url=http://monitor.red-gate.com]monitor.red-gate.com[/url]</description><pubDate>Fri, 14 Sep 2012 06:02:58 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item><item><title>RE: SSC Clinic: Finding the rogue query</title><link>http://www.sqlservercentral.com/Forums/Topic1358350-217-1.aspx</link><description>Check the stats on the table.Look at execution plan for bootlenecks/scans etcVeryify order of Where parameters works to effectivelyCheck the indexes for existence and fragmentation.Definitely pre calc the date comparision.If stored procedure then after verifying stats are up to date then I'd do an sp_recompile on the sProcMuch to learn, teach me Yoda</description><pubDate>Thu, 13 Sep 2012 10:46:48 GMT</pubDate><dc:creator>Tom_Sacramento</dc:creator></item><item><title>RE: SSC Clinic: Finding the rogue query</title><link>http://www.sqlservercentral.com/Forums/Topic1358350-217-1.aspx</link><description>[quote][b]tolga.kurkcuoglu (9/13/2012)[/b][hr]from the name of the table, I guess there is a considerable amount of records in it.It looks like it, unneccessarily, computes the dateadd function for each row.you might store the value in a variabledeclare @yesterday smalldatetime = dateadd("d", -1, getdate())and use it like... and date &amp;gt; @yesterday[/quote]I doubt that that will make any difference. I'd be very surprised if the engine calls the dateadd function more than once. In the optimization phase it will do what you suggest. It just won't tell you about it.</description><pubDate>Thu, 13 Sep 2012 09:20:53 GMT</pubDate><dc:creator>Dean Cochrane</dc:creator></item><item><title>RE: SSC Clinic: Finding the rogue query</title><link>http://www.sqlservercentral.com/Forums/Topic1358350-217-1.aspx</link><description>Where are those analysis pages coming from?  Is it a feature in SQL activity monitor?  If so, please advice the proper steps to do what you show.  If you are using a tool to build sll that, let me know what u use.</description><pubDate>Thu, 13 Sep 2012 08:36:54 GMT</pubDate><dc:creator>OceanDeep</dc:creator></item><item><title>RE: SSC Clinic: Finding the rogue query</title><link>http://www.sqlservercentral.com/Forums/Topic1358350-217-1.aspx</link><description>"The measured average is only .4 at peaks around that time, so we're not looking at multiple processes fighting over the processor. That means one event is causing the problem."How did you know it was only one event? Or that it wasn't multiple processes?Thanks. </description><pubDate>Thu, 13 Sep 2012 06:45:29 GMT</pubDate><dc:creator>donald.maslanka</dc:creator></item><item><title>RE: SSC Clinic: Finding the rogue query</title><link>http://www.sqlservercentral.com/Forums/Topic1358350-217-1.aspx</link><description>Good suggestion. I haven't started tuning the query yet, but that's absolutely one of the changes I'll make. Thanks.</description><pubDate>Thu, 13 Sep 2012 06:03:00 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item><item><title>RE: SSC Clinic: Finding the rogue query</title><link>http://www.sqlservercentral.com/Forums/Topic1358350-217-1.aspx</link><description>from the name of the table, I guess there is a considerable amount of records in it.It looks like it, unneccessarily, computes the dateadd function for each row.you might store the value in a variabledeclare @yesterday smalldatetime = dateadd("d", -1, getdate())and use it like... and date &amp;gt; @yesterday</description><pubDate>Thu, 13 Sep 2012 02:28:19 GMT</pubDate><dc:creator>tolga.kurkcuoglu</dc:creator></item><item><title>SSC Clinic: Finding the rogue query</title><link>http://www.sqlservercentral.com/Forums/Topic1358350-217-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/Memory/93225/"&gt;SSC Clinic: Finding the rogue query&lt;/A&gt;[/B]</description><pubDate>Thu, 13 Sep 2012 00:03:25 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item></channel></rss>