How to find if some index is ever used?
Posted in 2000
Topics: General Discussion
Hello, Informix Users, I have a database that have be in use for a long time. Over times, there are more and more indexes are created on the tables. There should be some indexes that is no longer needed. But before dropping those indexes, I want to make sure they are not in use any more for a period of time (see a week). My question is: Is there any ways that I can find out if some index is ever used? The database is in production, it is not convenient/possible to gather all SQLs against the database and set explain to them to find out the indexes that are used. Thanks. Wendy
Wendy Zheng wrote:
>
> Hello, Informix Users,
>
> I have a database that have be in use for a long time. Over times, there are
> more and more indexes are created on the tables.
> There should be some indexes that is no longer needed.
> But before dropping those indexes, I want to make sure they are not in use
> any more for a period of time (see a week).
> My question is:
>
> Is there any ways that I can find out if some index is ever used?
>
> The database is in production, it is not convenient/possible to gather all
> SQLs against the database and set explain to them to find out the indexes
> that are used.
You could detach the indexes you suspect are no longer needed, turn on
tablspace stats (onconfig parameter TBLSPACESTATS ??) and use onstat to
see if there is any activity on the detached indexes partnums over
time.
--
Art S. Kagel & Family
kagel@erols.com