El TecnoBaúl de Kiquenet

Kiquenet boring stories

Archive for 24 marzo 2010

Obtener índices de una tabla

Posted by kiquenet en 24 marzo 2010

Podemos utilizar consultas de este tipo:

select * from USER_IND_COLUMNS b

select * from USER_INDEXES a
SELECT
a.index_name,a.index_type,a.table_name
,b.column_name

from  USER_INDEXES a, USER_IND_COLUMNS b
WHERE a.index_name = b.index_name;

select * from ALL_INDEXES where index_name like ‘INX_SITCORE_%’

Algunos comentarios más:

Also dba_indexes is not the dba’s indexes. It’s a view.
There are three catagories
DBA_INDEXES – shows all the indexes of all schemas
(View Accessable by DBA)

ALL_INDEXES – All indexes of that schema querrying and other schemas (those accesible by him)

USER_INDEXES – All indexes of that schemaquerrying the view.

So there is no redundancy in creating an index with same names by different schema as long as the objects belong to them.

Anuncios

Posted in SQL | Etiquetado: | Leave a Comment »