Unused Secondary Indexes

Database
KVB
Enthusiast

Unused Secondary Indexes

Hi ,

I have secondary indexes on a few tables which were unused.Tables are of large size (>100 million rows)In that case,how much the impact will be there on the database?

1 REPLY
Enthusiast

Re: Unused Secondary Indexes

The below should give the space occupied by the secondary index on any table. First you need to collect demographics

COLLECT DEMOGRAPHICS
FOR databasename.tablename
INTO qcd ALL;

 SEL
 databasename
 ,tablename
 ,SubTableID
 ,subtabletype
 ,SUM(RowCount*AvgRowSize) AS SizeInBytes
 FROM qcd.DataDemographicsView ddv
 GROUP BY 1,2,3,4