<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; A Funny Cartoon on Index</title>
	<atom:link href="http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Thu, 20 Jun 2013 10:56:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #012 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-409577</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #012 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 19 Jan 2013 01:31:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-409577</guid>
		<description><![CDATA[[...] A Funny Cartoon on Index [...]]]></description>
		<content:encoded><![CDATA[<p>[...] A Funny Cartoon on Index [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drmk</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-300633</link>
		<dc:creator><![CDATA[Drmk]]></dc:creator>
		<pubDate>Tue, 12 Jun 2012 23:56:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-300633</guid>
		<description><![CDATA[Could you share the script you used?]]></description>
		<content:encoded><![CDATA[<p>Could you share the script you used?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drmk</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-300630</link>
		<dc:creator><![CDATA[Drmk]]></dc:creator>
		<pubDate>Tue, 12 Jun 2012 23:50:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-300630</guid>
		<description><![CDATA[I gues you meant indexes are not the ONLY painkillers]]></description>
		<content:encoded><![CDATA[<p>I gues you meant indexes are not the ONLY painkillers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manoj Maurya</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-121929</link>
		<dc:creator><![CDATA[Manoj Maurya]]></dc:creator>
		<pubDate>Sat, 05 Mar 2011 01:41:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-121929</guid>
		<description><![CDATA[Hi Pinal,
This cartoon is OK but if query is not working, this is always good to first check if indexes are required for the given query and if required, then if indexes are present or not. Indexes are not the fix for everything but they come first into the line of fire. In other words, if you have a table of a million rows and you select from this table with a column in WHERE clause, then what can you do, to get the results faster, other than creating an index?
Again, as obvious, optimization on creation of indexes is required to depending on amount of SELECTs vs INSERTs/UPDATEs/DELETEs in the system.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
This cartoon is OK but if query is not working, this is always good to first check if indexes are required for the given query and if required, then if indexes are present or not. Indexes are not the fix for everything but they come first into the line of fire. In other words, if you have a table of a million rows and you select from this table with a column in WHERE clause, then what can you do, to get the results faster, other than creating an index?<br />
Again, as obvious, optimization on creation of indexes is required to depending on amount of SELECTs vs INSERTs/UPDATEs/DELETEs in the system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Mogford</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-112110</link>
		<dc:creator><![CDATA[Andrew Mogford]]></dc:creator>
		<pubDate>Wed, 19 Jan 2011 19:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-112110</guid>
		<description><![CDATA[Weicco,
Thanks for this, I will try it out.]]></description>
		<content:encoded><![CDATA[<p>Weicco,<br />
Thanks for this, I will try it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: weicco</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-112034</link>
		<dc:creator><![CDATA[weicco]]></dc:creator>
		<pubDate>Wed, 19 Jan 2011 10:03:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-112034</guid>
		<description><![CDATA[I don&#039;t have the original one at hand but I used something like this.

select o.name table_name, i.name index_name, user_seeks, user_scans, user_lookups, user_updates, used_page_count * 8 used_kb
from sys.dm_db_index_usage_stats s
join sys.objects o on o.object_id = s.object_id
join sys.indexes i on i.object_id = s.object_id and i.index_id = s.index_id
join sys.dm_db_partition_stats ps on ps.object_id = i.object_id and ps.index_id = i.index_id
where s.database_id = db_id() -- only current database
and s.index_id &gt; 1 -- omit heaps
and (user_seeks = 0 and user_scans = 0)
order by used_kb desc]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t have the original one at hand but I used something like this.</p>
<p>select o.name table_name, i.name index_name, user_seeks, user_scans, user_lookups, user_updates, used_page_count * 8 used_kb<br />
from sys.dm_db_index_usage_stats s<br />
join sys.objects o on o.object_id = s.object_id<br />
join sys.indexes i on i.object_id = s.object_id and i.index_id = s.index_id<br />
join sys.dm_db_partition_stats ps on ps.object_id = i.object_id and ps.index_id = i.index_id<br />
where s.database_id = db_id() &#8212; only current database<br />
and s.index_id &gt; 1 &#8212; omit heaps<br />
and (user_seeks = 0 and user_scans = 0)<br />
order by used_kb desc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Mogford</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-112013</link>
		<dc:creator><![CDATA[Andrew Mogford]]></dc:creator>
		<pubDate>Wed, 19 Jan 2011 08:38:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-112013</guid>
		<description><![CDATA[Marko,

Your script sounds very interesting. I did write an application that did a similar things using SQL SMO, reporting on the tables and indexes in a database and how much space they used. In fact, it could do this for all databases on all Servers on a network . However, I did not even think about the issue of checking if an index is used or not. I would love to know how you checked in an index is used or not.]]></description>
		<content:encoded><![CDATA[<p>Marko,</p>
<p>Your script sounds very interesting. I did write an application that did a similar things using SQL SMO, reporting on the tables and indexes in a database and how much space they used. In fact, it could do this for all databases on all Servers on a network . However, I did not even think about the issue of checking if an index is used or not. I would love to know how you checked in an index is used or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko Parkkola</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111760</link>
		<dc:creator><![CDATA[Marko Parkkola]]></dc:creator>
		<pubDate>Tue, 18 Jan 2011 18:37:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111760</guid>
		<description><![CDATA[&quot;I have come accross developers who just index every column in a database&quot;

I wrote a script that goes through every index in the db, checks if they aren&#039;t used and returns how many kilobytes they take disk space. I ran it through one of our badly behaving database and got some interesting results. Unused indexes, that were probably inserted &quot;just to be sure&quot;, takes space A LOT and are updated a lot. So they are there just ruining performance.

At the same time there are some queries that needs indexing badly. Although tables has indexes they aren&#039;t used because all the joins and indexes doesn&#039;t match.]]></description>
		<content:encoded><![CDATA[<p>&#8220;I have come accross developers who just index every column in a database&#8221;</p>
<p>I wrote a script that goes through every index in the db, checks if they aren&#8217;t used and returns how many kilobytes they take disk space. I ran it through one of our badly behaving database and got some interesting results. Unused indexes, that were probably inserted &#8220;just to be sure&#8221;, takes space A LOT and are updated a lot. So they are there just ruining performance.</p>
<p>At the same time there are some queries that needs indexing badly. Although tables has indexes they aren&#8217;t used because all the joins and indexes doesn&#8217;t match.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Mogford</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111736</link>
		<dc:creator><![CDATA[Andrew Mogford]]></dc:creator>
		<pubDate>Tue, 18 Jan 2011 16:44:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111736</guid>
		<description><![CDATA[I found dealing with a database in which some tables gained 2 to 3 millions rows per day really focused the mind on indexing. With that amound of data loading, too many indexes can be a big problem too. I have come accross developers who just index every column in a database, &quot;just to be on the safe side&quot;. Once you have the painful experience of trying to insert large amounts of data regularly into tables with lots of indexes it focuses the mind.

I also found different versions of SQL Server behave differently. When loading millions of rows into SQL Server 2000 it proved best to drop the indexes, do the insert and rebuild them. With the same system on SQL Server 2005 it is no longer neccessary to do that.]]></description>
		<content:encoded><![CDATA[<p>I found dealing with a database in which some tables gained 2 to 3 millions rows per day really focused the mind on indexing. With that amound of data loading, too many indexes can be a big problem too. I have come accross developers who just index every column in a database, &#8220;just to be on the safe side&#8221;. Once you have the painful experience of trying to insert large amounts of data regularly into tables with lots of indexes it focuses the mind.</p>
<p>I also found different versions of SQL Server behave differently. When loading millions of rows into SQL Server 2000 it proved best to drop the indexes, do the insert and rebuild them. With the same system on SQL Server 2005 it is no longer neccessary to do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramdas</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111675</link>
		<dc:creator><![CDATA[Ramdas]]></dc:creator>
		<pubDate>Tue, 18 Jan 2011 14:39:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111675</guid>
		<description><![CDATA[The cartoon clearly illustrates how performance issues are dealt with, like a quick fix without analyzing the root cause.]]></description>
		<content:encoded><![CDATA[<p>The cartoon clearly illustrates how performance issues are dealt with, like a quick fix without analyzing the root cause.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ishrar</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111673</link>
		<dc:creator><![CDATA[Ishrar]]></dc:creator>
		<pubDate>Tue, 18 Jan 2011 14:30:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111673</guid>
		<description><![CDATA[Hi Pinal, 

Nice cartoon.. 

Always I can see, you suggest people to tune up Indexes for query performance, and that is good practice indeed. 
But I believe joins used in query also affects in different ways. Tuning up Joins in proper way can improve the performance. 

Sometimes we use Join with select query with join statement and sometimes we use table name with join statement. 

Can you please write about using smart ways of using joins to improve performance.
When not to use sub queries and when not to use joins.

You wrote about basics of joins here
http://blog.sqlauthority.com/2009/04/13/sql-server-introduction-to-joins-basic-of-joins/

It will be my pleasure if you write or refer some article for best ideas of using joins and sub queries, when to use and not to use.

Can you write about how to identify and understand &quot;Execution Plans&quot;


Thanks a lot for all your Posts.. 


Hi all readers, please give your suggestions and ideas about my question.

Thanks.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal, </p>
<p>Nice cartoon.. </p>
<p>Always I can see, you suggest people to tune up Indexes for query performance, and that is good practice indeed.<br />
But I believe joins used in query also affects in different ways. Tuning up Joins in proper way can improve the performance. </p>
<p>Sometimes we use Join with select query with join statement and sometimes we use table name with join statement. </p>
<p>Can you please write about using smart ways of using joins to improve performance.<br />
When not to use sub queries and when not to use joins.</p>
<p>You wrote about basics of joins here<br />
<a href="http://blog.sqlauthority.com/2009/04/13/sql-server-introduction-to-joins-basic-of-joins/" rel="nofollow">http://blog.sqlauthority.com/2009/04/13/sql-server-introduction-to-joins-basic-of-joins/</a></p>
<p>It will be my pleasure if you write or refer some article for best ideas of using joins and sub queries, when to use and not to use.</p>
<p>Can you write about how to identify and understand &#8220;Execution Plans&#8221;</p>
<p>Thanks a lot for all your Posts.. </p>
<p>Hi all readers, please give your suggestions and ideas about my question.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111315</link>
		<dc:creator><![CDATA[John]]></dc:creator>
		<pubDate>Mon, 17 Jan 2011 12:00:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111315</guid>
		<description><![CDATA[I agree with everyone on expanding on each point mentioned above. 
If you can expand on each of those above mentioned performance tuning points as a series of posts, you&#039;ll be a real life saver for many..]]></description>
		<content:encoded><![CDATA[<p>I agree with everyone on expanding on each point mentioned above.<br />
If you can expand on each of those above mentioned performance tuning points as a series of posts, you&#8217;ll be a real life saver for many..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Animesh Upadhyay</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111309</link>
		<dc:creator><![CDATA[Animesh Upadhyay]]></dc:creator>
		<pubDate>Mon, 17 Jan 2011 10:21:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111309</guid>
		<description><![CDATA[Cartoons are Great way to communicate the message, you have used cartoons in your earlier posts also and are very nice!

Indexing is a critical issue and Planning of them should be done carefully. Which fields to be made as clustered indexed and their data type(ideally should be of fix width and non nullable). Which fields to be used in non clustered index? Also Covering Indexes and Filtered Indexes. Creating Indexes is important but too many indexes can also cause performance issues. Monitoring, Indexes that are not in use and fragmentation of Indexes. Using Re-Organize and Re-Build(should be used when fragmentation is quite high as it can cause huge transaction logs, in full recovery mode). In all it is a very important aspect of performance tuning.]]></description>
		<content:encoded><![CDATA[<p>Cartoons are Great way to communicate the message, you have used cartoons in your earlier posts also and are very nice!</p>
<p>Indexing is a critical issue and Planning of them should be done carefully. Which fields to be made as clustered indexed and their data type(ideally should be of fix width and non nullable). Which fields to be used in non clustered index? Also Covering Indexes and Filtered Indexes. Creating Indexes is important but too many indexes can also cause performance issues. Monitoring, Indexes that are not in use and fragmentation of Indexes. Using Re-Organize and Re-Build(should be used when fragmentation is quite high as it can cause huge transaction logs, in full recovery mode). In all it is a very important aspect of performance tuning.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hemant Yadav</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111285</link>
		<dc:creator><![CDATA[Hemant Yadav]]></dc:creator>
		<pubDate>Mon, 17 Jan 2011 07:29:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111285</guid>
		<description><![CDATA[Yes It is very nice cartoon presented. In Most of cases when we get issue on query performance we seen same answer  that is indexing.]]></description>
		<content:encoded><![CDATA[<p>Yes It is very nice cartoon presented. In Most of cases when we get issue on query performance we seen same answer  that is indexing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaspalsinh Chauhan</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111278</link>
		<dc:creator><![CDATA[Jaspalsinh Chauhan]]></dc:creator>
		<pubDate>Mon, 17 Jan 2011 06:30:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111278</guid>
		<description><![CDATA[We nice cartoon indeed. Thanks for solving the confusion. Would like to hear on those points in more detail in future post. Thanks]]></description>
		<content:encoded><![CDATA[<p>We nice cartoon indeed. Thanks for solving the confusion. Would like to hear on those points in more detail in future post. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko Parkkola</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111275</link>
		<dc:creator><![CDATA[Marko Parkkola]]></dc:creator>
		<pubDate>Mon, 17 Jan 2011 06:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111275</guid>
		<description><![CDATA[Yes, indexes aren&#039;t silver bullets. One should consider them carefully and check that after index has been created it is actually used. Otherwise you end up index which slows inserts and does no good on selects.

But I&#039;m seeing more and more totally non-indexed databases these days. Even databases which has tables without clustered index. There&#039;s one database which was crawling because a single select could do thousands table scans. In these cases it is totally safe to blurt &quot;create index on it&quot;.]]></description>
		<content:encoded><![CDATA[<p>Yes, indexes aren&#8217;t silver bullets. One should consider them carefully and check that after index has been created it is actually used. Otherwise you end up index which slows inserts and does no good on selects.</p>
<p>But I&#8217;m seeing more and more totally non-indexed databases these days. Even databases which has tables without clustered index. There&#8217;s one database which was crawling because a single select could do thousands table scans. In these cases it is totally safe to blurt &#8220;create index on it&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ayyappan</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111270</link>
		<dc:creator><![CDATA[Ayyappan]]></dc:creator>
		<pubDate>Mon, 17 Jan 2011 05:36:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111270</guid>
		<description><![CDATA[Very nice cartoon... Indexes are not the painkillers.]]></description>
		<content:encoded><![CDATA[<p>Very nice cartoon&#8230; Indexes are not the painkillers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SURESH</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111269</link>
		<dc:creator><![CDATA[SURESH]]></dc:creator>
		<pubDate>Mon, 17 Jan 2011 05:05:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111269</guid>
		<description><![CDATA[Dear sir,

     That picture tells me that,the GREEN MAN knows the structure of the database and the BLACK MAN&#039;s knowledge on the subject......]]></description>
		<content:encoded><![CDATA[<p>Dear sir,</p>
<p>     That picture tells me that,the GREEN MAN knows the structure of the database and the BLACK MAN&#8217;s knowledge on the subject&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar Harsh</title>
		<link>http://blog.sqlauthority.com/2011/01/17/sql-server-a-funny-cartoon-on-index/#comment-111267</link>
		<dc:creator><![CDATA[Kumar Harsh]]></dc:creator>
		<pubDate>Mon, 17 Jan 2011 04:38:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=11660#comment-111267</guid>
		<description><![CDATA[Hi,

Can you elaborate each point with example ?
Anyone ?

Thanks.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Can you elaborate each point with example ?<br />
Anyone ?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
