Counter from USER_INDEXES and ALL_INDEXES

I tried to execute the following query to get the index counter from my schema.

select count(*) from USER_INDEXES; - who gave me the score 397

But select count(*) from ALL_INDEXES where table_owner ='MY_SCHEMA'; - gave me 357 .

What does that sound like? Should both be the same?

When checking with Oracle SQL developer by counting the indices themselves, give me 397

+7
oracle
source share
1 answer

This is because the ALL_INDEXES contains all the indexes that the current user has the ability to change. You will not see the LOB index in this view, because LOB indices cannot be renamed, rebuilt, or modified.

So far, the USER_INDEXES view contains all the indexes that the user owns. The LOB index will be in this view if the user requesting it is the same user who created it.

+8
source share

All Articles