{"id":748,"date":"2010-09-23T09:46:38","date_gmt":"2010-09-23T03:46:38","guid":{"rendered":"http:\/\/techsatwork.com\/blog\/?p=748"},"modified":"2016-01-07T11:31:09","modified_gmt":"2016-01-07T05:31:09","slug":"unused-db2-indexes-part-ii","status":"publish","type":"post","link":"https:\/\/techsatwork.com\/?p=748","title":{"rendered":"Are my indexes used ? &#8211; Part II"},"content":{"rendered":"<p>Last year, I wrote an <a href=\"https:\/\/techsatwork.com\/blog\/?p=360\" target=\"_blank\">article<\/a> and a script that helps to identify unused indexes in DB2 UDB. \u00c2\u00a0Its unfortunate, IBM doesn&#8217;t provide an easy way of identifying them. In DB2 Z\/os, you can look up SMF records or use DB2PM or BMC to find them pretty easily. Oracle and Microsoft provides native tools to identify them easily, but not in UDB, unless you buy Query Patrol. \u00c2\u00a0Of course like I mentioned last year, you can run my script to identify those unused indexes, but there is a bit of \u00c2\u00a0translation work that you had to do. Well now I have done the translation part for you. \u00c2\u00a0Earlier the script only showed the index id (IID), you had to manually look up the numbers on syscat.indexes or sysibm.indexes to identify the actual index, now my script will \u00c2\u00a0list out the actual index name , column names and so on. \u00c2\u00a0The script will also load the data into a table on the database and will run a MERGE script to populate the details. \u00c2\u00a0The <a href=\"https:\/\/techsatwork.com\/blog\/wp-content\/uploads\/2010\/09\/index_usages.zip\">index_usage.zip<\/a> contains three files :<br \/>\n1. unused_indexes.ddl<br \/>\n2. index_usage.sh<br \/>\n3. update_unused_indexes.sql<\/p>\n<p>As always, do due diligence and review my scripts before you execute it. \u00c2\u00a0 \u00c2\u00a0If you find any issues or questions please let me know<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last year, I wrote an article and a script that helps to identify unused indexes in DB2 UDB. \u00c2\u00a0Its unfortunate, IBM doesn&#8217;t provide an easy way of identifying them. In DB2 Z\/os, you can look up SMF records or use DB2PM or BMC to find them pretty easily. Oracle and Microsoft provides native tools to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[3],"tags":[375,374,186,376,221,377,224],"class_list":["post-748","post","type-post","status-publish","format-standard","hentry","category-db2","tag-db2-indexes-that-are-not-used","tag-db2-unused-index","tag-db2pd","tag-identify-indexes","tag-index-usage","tag-merge","tag-tcbstat"],"_links":{"self":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=748"}],"version-history":[{"count":5,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/748\/revisions"}],"predecessor-version":[{"id":1514,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/748\/revisions\/1514"}],"wp:attachment":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}