Find tables without Indexes


Sometimes we need to analyze the performance of the query the first things comes in our mind is Index, the following query can be used to find those tables who don't have the indexes.

Run the following query
USE <your_database_name>; 
GO
SELECT SCHEMA_NAME(schema_id) AS schema_name,name AS tbl_name
FROM sys.tables
WHERE OBJECTPROPERTY(OBJECT_ID,'IsIndexed') = 0
ORDER BY schema_name, tbl_name;
GO

No comments:

Post a Comment

Please do not enter any spam link in the comment box.

NUnit : Introduction

There are several unit test tools in the market, but one of them is NUnit, the most popular tool for doing unit testing. So in this tutorial...