Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Index comparison

$
0
0
DB2 v9.7.5 Linux

I work mostly with SQL performance and on the mainframe, so a little help here would be appreciated. I have compiled a list of indexes that haven't been used in over 6 months, but some of them are unique. So, I want to do an exists to see if any that are unique have another index out there with the same columns that enforce the same uniqueness. For instance, the unique key for the table may be col1, col2, now lets say I have another index col3, col2, col1, it may have been defined as unique since it contains the unique key. The problem I am having is the catalog is a little different on here than I am used to, on the mainframe we have syskeys table that has a row per index column. Here on LUW, I am finding that all of the columns are in a single column. Any ideas on how I would write the SQL to see if this jumble is in that other jumble?

Thanks.
Dave

Viewing all articles
Browse latest Browse all 13329

Trending Articles