Comments on: Find Tables That Are Missing a Clustered Index https://thomaslarock.com/2010/03/find-tables-that-are-missing-a-clustered-index/ Thomas LaRock is an author, speaker, data expert, and SQLRockstar. He helps people connect, learn, and share. Along the way he solves data problems, too. Mon, 09 Jun 2014 18:31:24 +0000 hourly 1 https://wordpress.org/?v=6.7.2 By: Microsoft Azure SQL Database Data Compression - SQL Server - SQL Server - Toad World https://thomaslarock.com/2010/03/find-tables-that-are-missing-a-clustered-index/#comment-11012 Mon, 09 Jun 2014 18:31:24 +0000 http://thomaslarock.com/?p=3918#comment-11012 […] the SalesOrderDetail table from AdventureWorks2012. I then created a clustered index on that table, because every table in MASD needs a clustered index. Here’s the quick […]

]]>
By: Microsoft Azure SQL Database Data Compression - SQLRockstar - Thomas LaRock https://thomaslarock.com/2010/03/find-tables-that-are-missing-a-clustered-index/#comment-11011 Mon, 09 Jun 2014 18:14:44 +0000 http://thomaslarock.com/?p=3918#comment-11011 […] the SalesOrderDetail table from AdventureWorks2012. I then created a clustered index on that table, because every table in MASD needs a clustered index. Here’s the quick […]

]]>
By: March Madness – SQL Server System Tables – sysindexes | SQLRockstar https://thomaslarock.com/2010/03/find-tables-that-are-missing-a-clustered-index/#comment-1378 Mon, 04 Apr 2011 16:11:26 +0000 http://thomaslarock.com/?p=3918#comment-1378 […] anything interesting? This table (sysindexes) also happens to be very useful for migrating to the cloud because every user table there needs a clustered index there. So this code could be useful for you […]

]]>
By: The Grateful DBA » Missing Clustered Indexes w/ Row Counts https://thomaslarock.com/2010/03/find-tables-that-are-missing-a-clustered-index/#comment-1377 Thu, 01 Apr 2010 20:32:28 +0000 http://thomaslarock.com/?p=3918#comment-1377 […] post is a follow-up to Thomas LaRock’s excellent article here, so first go read that. I’ll […]

]]>
By: Thomas LaRock https://thomaslarock.com/2010/03/find-tables-that-are-missing-a-clustered-index/#comment-1376 Thu, 01 Apr 2010 14:11:58 +0000 http://thomaslarock.com/?p=3918#comment-1376 In reply to Joe Webb.

no problem Joe, glad I could help.

]]>
By: Joe Webb https://thomaslarock.com/2010/03/find-tables-that-are-missing-a-clustered-index/#comment-1375 Thu, 01 Apr 2010 01:53:20 +0000 http://thomaslarock.com/?p=3918#comment-1375 Nice script, Tom. Thanks for sharing.

]]>
By: Michael J Swart https://thomaslarock.com/2010/03/find-tables-that-are-missing-a-clustered-index/#comment-1374 Wed, 31 Mar 2010 20:20:09 +0000 http://thomaslarock.com/?p=3918#comment-1374 What’s interesting is that every table has one and only one heap or clustered index. So by looking at heaps (index_id = 0) we have

SELECT t.name
from sys.indexes i
join sys.tables t on t.object_id = i.object_id
where i.index_id = 0

]]>