Quote:
|
Originally Posted by vrm468
is there any way in db2 to recognize the unused indexes present on the tables?
|
There are some other potential aspects of index "use" that the Design Advisor will never catch:
- a
unique index has, as everybody knows, some interesting side effects even if not used in an access path
- the mere existence of an index can give the optimizer certain information which it would otherwise not have, e.g. index-based statistics. Dropping such an index will potentially change access paths (in a potentially negative way)
unless one is aware of the fact and generates non-index-based statistics that carry the same information (if at all possible).
(I can give more details for DB2 on z/OS for those of you interested in it.)
Bottom line: there is no 100% foolproof automatic way to do this; one has to know & understand the database design and the applications/queries typically used against it.