Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to access SYSCAT.INDEXES

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 64

PostPosted: Thu Apr 25, 2013 1:08 am    Post subject: How to access SYSCAT.INDEXES
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 25, 2013 1:32 am    Post subject:
Reply with quote

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
View user's profile Send private message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 64

PostPosted: Thu Apr 25, 2013 1:44 am    Post subject:
Reply with quote

Hi Dick Scherrer,


I found the information in the below link
http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.mon.doc%2Fdoc%2Fc0056434.html



It mentions,

To identify opportunities to save space and maintenance overhead, you can examine last used information for indexes every year by checking the LASTUSED column in the SYSCAT.INDEXES catalog view.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Thu Apr 25, 2013 2:21 am    Post subject:
Reply with quote

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
View user's profile Send private message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 64

PostPosted: Thu Apr 25, 2013 2:23 am    Post subject:
Reply with quote

So is there any other way to get the unused Indexes
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Apr 25, 2013 9:58 am    Post subject:
Reply with quote

Hi ravikumar15,

You should be looking at SYSIBM.SYSINDEXSPACESTATS

Regards,
Sushanth
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Apr 25, 2013 10:05 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts User access certification In Mainfram... Virendra Shambharkar All Other Mainframe Topics 4 Tue Oct 03, 2017 12:32 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
This topic is locked: you cannot edit posts or make replies. Limit access to certain RACF group cvnlynn CLIST & REXX 5 Wed Aug 23, 2017 2:28 am
No new posts Identify top 30 big tables or indexes... ashek15 DB2 0 Fri Jun 16, 2017 10:01 am
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us