This topic describes how you can view indexes.
MySQL mode
In MySQL mode, you can use the SHOW INDEXstatement to view the indexes on a table.
For example, the following statement queries the indexes of Table test:
obclient> SHOW INDEX FROM test;
Oracle mode
In Oracle mode, you can view indexes in system views. An Oracle tenant can view indexes in the following views: USER_INDEXES, ALL_INDEXES, DBA_INDEXES, ALL_IND_COLUMNS, DBA_IND_COLUMNS, and USER_IND_COLUMNS.
View all indexes of a table.
obclient> SELECT * FROM ALL_INDEXES WHERE table_name='TEST';
View the detailed information about the indexes in a table:
obclient> SELECT * FROM USER_IND_COLUMNS WHERE table_name='TEST';