View previous topic :: View next topic
|
Author |
Message |
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
Hi,
I want to identify the unused Indexes in our application. I am trying to get that information from the system catalog table, SYSCAT.INDEXES, but I am getting SQL code -204, ERROR: SYSCAT.INDEXES IS AN UNDEFINED NAME.
Can any one please help me in finding out the unused Indexes.
Thank you, |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Where did you find/learn SYSCAT.INDEXES?
There is no such system table . . .
If there was one, how would querying it identify unused indexes? |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
From the top of the page I got which I clicked on your link:
Quote: |
DB2 Version 9.7 for Linux, UNIX, and Windows |
Mainframe DB2 is not the same as DB2 for Linux, UNIX, and Windows. |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
So is there any other way to get the unused Indexes |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
For each index, a new real-time statistics column (LASTUSED) is maintained in table SYSIBM.SYSINDEXSPACESTATS. It is updated whenever the index is used in SELECT/FETCH, searched UPDATE/DELETE, Referential Integrity checking. The column is not updated for INSERT, LOAD, etc.
Be careful with indexes that enforce uniqueness. |
|
Back to top |
|
|
|