Search code examples
oracle-databaseoracle12cdatabase-indexesmaximo

Maximo: ASSET table has duplicate indexes?


I have been investigating the indexes on the asset table in Maximo 7.6.1.1.

I noticed that there are a couple of indexes that appear to be duplicated:

  • ASSET_NDX1
  • ASSET_NDX14

enter image description here

Query the indexes:

select  
    *
from    
    all_indexes
where   
    table_name = 'ASSET'
    and index_name in ('ASSET_NDX1','ASSET_NDX14')

enter image description here


Are the indexes duplicates?

And if not, what is each used for?


Solution

  • They are not the same, so they could potentially both be useful for different queries:

    This could use ASSET_NDX14 (and not touch the table):

    select siteid 
    from asset
    where assetnum = :a;
    

    This could use ASSET_NDX1 (and not touch the table):

    select assetnum
    from asset
    where siteid = :s;
    

    See Oracle Database Concepts Guide for more details about composite indexes.