find table without indexing in SQL Server

The index in the table is very useful for data to accelerate. The index in the table help to get result fast. this is also important to query tuning. Without indexing when we join table it is very slow. when we have large data.
accessing data is also make slow.
basic Advantage of Indexing
- Index  help to speed up select query
-help to Make row unique or no duplicate

Main Disadvantage of Indexing is
-Indexes take additional Disk space

So if our data storage is low and we do not need to join multiple tables or we don't have large data we did not need to give the indexing

but you have a database but you don't know which table doesn't have any indexing so here simple query give you find tables without indexing

select stb.name,stb.type_desc,idx.index_id from sys.tables stb
inner join sys.indexes idx on stb.object_id=idx.object_id and idx.type=0
order by stb.name
 find table without indexing in SQL Server


This query shows the table name without index
 find table without indexing in SQL Server

0 Comments