-- Esse script retorna as tabelas que possuem mais índices

	
use seu_banco_de_dados go select x.id, x.table_name, x.Total_index, count(*) as Total_column from sys.columns cl join (select ix.object_id as id, tb.name as table_name, count(ix.object_id) as Total_index from sys.indexes ix join sys.objects tb on tb.object_id = ix.object_id and tb.type = 'u' group by ix.object_id, tb.name) x on x.id = cl.object_id group by id, table_name, Total_index order by 3 desc