<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>What you should know if you are using Logical IOs to measure query plan quality</title><link>http://blogs.msdn.com/b/sqlcat/archive/2008/04/10/what-you-should-know-if-you-are-using-logical-ios-to-measure-query-plan-quality.aspx</link><description>One of the presenters at recent SQL Server Open World conference in Denmark ( http://www.miracleas.dk/index.asp?page=168&amp;amp;page2=323 ) suggested tuning SQL queries using logical IOs to measure quality of query plan. The IO count is returned for each</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: What you should know if you are using Logical IOs to measure query plan quality</title><link>http://blogs.msdn.com/b/sqlcat/archive/2008/04/10/what-you-should-know-if-you-are-using-logical-ios-to-measure-query-plan-quality.aspx#10325102</link><pubDate>Thu, 28 Jun 2012 15:54:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10325102</guid><dc:creator>Lubor</dc:creator><description>&lt;p&gt;GulliMeel - you are correct. And the number of CPU operations per row with scan depends on many things - the predicate, number of data types of the columns in the row, data types in the comparison, need for implicit data type conversion, etc. Therefore it is impossible to give generic answer “it takes x CPU cycles to process each row”. &lt;/p&gt;
&lt;p&gt;The “seeks” cost also depends on many factors. Usually we are seeking for all matching values – so we have first “locate” the start of the match and then continue walking forward while the compared values match. &lt;/p&gt;
&lt;p&gt;I think it is almost impossible to come up with general rule “what is better” covering the various combinations. The best is to measure…&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10325102" width="1" height="1"&gt;</description></item><item><title>re: What you should know if you are using Logical IOs to measure query plan quality</title><link>http://blogs.msdn.com/b/sqlcat/archive/2008/04/10/what-you-should-know-if-you-are-using-logical-ios-to-measure-query-plan-quality.aspx#10324908</link><pubDate>Thu, 28 Jun 2012 06:04:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10324908</guid><dc:creator>GulliMeel</dc:creator><description>&lt;p&gt;In the case of table scan the CPU time was more as it has to check for ach and every row whether that is matching with one of the passed value. Thus you could say 10 cpu opertaion. But 10 cpu opertaion should be cheaper than 18 logical IO&amp;#39;s(through index seek). Also, I am wondering whether sql server uses 100 CPU opertaion or 10 cpu opertaion or 55 cpu opertaions for those 10 rows.SO it should be included as well. The index is covering index.If it were not things might have been different (i have not tried it yet) but I will try it later.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10324908" width="1" height="1"&gt;</description></item><item><title>re: What you should know if you are using Logical IOs to measure query plan quality</title><link>http://blogs.msdn.com/b/sqlcat/archive/2008/04/10/what-you-should-know-if-you-are-using-logical-ios-to-measure-query-plan-quality.aspx#8894513</link><pubDate>Mon, 25 Aug 2008 21:00:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8894513</guid><dc:creator>LuborK</dc:creator><description>&lt;p&gt;I agree - the example is totally artificial and its goal is only to demonstrate the point. The point about tuning queries with large amounts of I/Os first is correct unless you are dealing with queries executed tens of thousands of time a minute. That is frequent scenario for web backends. There shaving off several I/Os from each execution may cause a miracle.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8894513" width="1" height="1"&gt;</description></item><item><title>re: What you should know if you are using Logical IOs to measure query plan quality</title><link>http://blogs.msdn.com/b/sqlcat/archive/2008/04/10/what-you-should-know-if-you-are-using-logical-ios-to-measure-query-plan-quality.aspx#8883886</link><pubDate>Thu, 21 Aug 2008 10:37:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8883886</guid><dc:creator>colin leversuch-roberts</dc:creator><description>&lt;p&gt;It's a bit of an artificial example and of the &amp;quot;it depends&amp;quot; scenario. I usually try and make sure I use a table of several million rows and varying widths when I do this type of test. In fairness I'm usually looking to tune queries which take thousands ( and sometimes millions ) of io - I rarely get down to looking at queries under 100 io. Good points though.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8883886" width="1" height="1"&gt;</description></item><item><title>re: What you should know if you are using Logical IOs to measure query plan quality</title><link>http://blogs.msdn.com/b/sqlcat/archive/2008/04/10/what-you-should-know-if-you-are-using-logical-ios-to-measure-query-plan-quality.aspx#8390587</link><pubDate>Mon, 14 Apr 2008 08:38:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8390587</guid><dc:creator>MoansNogood</dc:creator><description>&lt;p&gt;Good one, Lubor.&lt;/p&gt;
&lt;p&gt;Something else regarding LIO: As with most other things in databases, the number of times something happens has no correlation to its duration.&lt;/p&gt;
&lt;p&gt;Anjo Kolk found that there are many different kinds of LIO, some fast, some slow, some with serialisation, some not - all depending on their purpose when called upon from the source code.&lt;/p&gt;
&lt;p&gt;So if you have 100 LIOs taking a total of 100 seconds (that would be a horrible day, indeed, but let's pretend for the sake of clarity) then we don't know if each of them took 1 second each or whether two of them took 42 seconds each and the rest (98 LIOs) took 16 seconds in total.&lt;/p&gt;
&lt;p&gt;If there's heavy skew like the above, we should be able to focus on the two really bad ones and go for their source.&lt;/p&gt;
&lt;p&gt;So that's ANOTHER level we have to dive into one day, my friend :-)).&lt;/p&gt;
&lt;p&gt;best regards,&lt;/p&gt;
&lt;p&gt;Mogens&lt;/p&gt;
&lt;p&gt;PS: This has no relevance here, but inside Oracle Anjo found close to a 1000 different LIO's - I don't think it's much different inside SQL Server.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8390587" width="1" height="1"&gt;</description></item><item><title>Airline Travel &amp;raquo; What you should know if you are using Logical IOs to measure query plan quality</title><link>http://blogs.msdn.com/b/sqlcat/archive/2008/04/10/what-you-should-know-if-you-are-using-logical-ios-to-measure-query-plan-quality.aspx#8375611</link><pubDate>Thu, 10 Apr 2008 20:22:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8375611</guid><dc:creator>Airline Travel &amp;raquo; What you should know if you are using Logical IOs to measure query plan quality</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.travel-hilarity.com/airline_travel/?p=2584"&gt;http://www.travel-hilarity.com/airline_travel/?p=2584&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8375611" width="1" height="1"&gt;</description></item></channel></rss>