Closed kadrlica closed 8 years ago
Here is my suggested modification to the query here:
query_template = """
SELECT tab.table_name,icol.column_name,idx.index_type,idx.index_name
FROM dba_tables tab
JOIN dba_indexes idx on idx.table_name = tab.table_name
JOIN dba_ind_columns icol ON idx.index_name = icol.index_name
WHERE tab.table_name='%s'
ORDER BY icol.column_name,idx.index_name
"""
I've removed idx.ityp_name
since I'm not sure what that column is supposed to display (it's output is always None
as far as I've seen).
Some additional issues with the current (and also the past) implementation:
show_index NSEVILLA.Y1A1_GOLD_1_0_1
returns nothing because the table is named Y1A1_GOLD_1_0_1
while the OWNER
is NSEVILLA
. Y1A1_FINALCUT
. It is supposed to be a SYNONYM
to Y1A1_OBJECTS
, but the indexes of Y1A1_OBJECTS
are not displayed when you run show_index Y1A1_FINALCUT
.
I think that there is something wrong with the output of
show_index
. For each indexed column, the query is repeating all other indexes (but not the index on that column).Here is the query that
easyaccess
is using:In comparison, here is a query that I modified from Brian Yanny:
Here is the output of
show_index
on theY1A1_EXPOSURE
table:Below is the output from the index query I modified from Brian: