Re: Tracking usage of index

From: Lok P <loknath.73_at_gmail.com>
Date: Fri, 27 Nov 2020 13:18:59 +0530
Message-ID: <CAKna9VYGLDxAdW7eFw5akkTvR9AReFE7s5dXn9oVgDx=sPn2aA_at_mail.gmail.com>



yes, but i was thinking as we are in version 19C, and i see in the blog stating, the index usage is now by default taken care by Oracle starting version 12.2 and the details gets flushed into DBA_INDEX_USAGE view. And no need to set the index monitoring ON specifically as it used to happen in 11.2.

But the issue is, when I tried collecting stats on the index , even then the DBA_INDEX_USAGE was getting populated which is wrong. It should only be populated when it really gets accessed for fetching data like SELECT queries etc. So wanted to understand , if any other way through which we will get the index usage correctly(may be new in 19.3)? Also foreign key access is not captured in this case, and dropping those indexes will be dangerous.

https://oracle-base.com/articles/12c/index-usage-tracking-12cr2

On Fri, Nov 27, 2020 at 3:59 AM Mladen Gogala <gogala.mladen_at_gmail.com> wrote:

> Hi Lok,
>
> You can turn on monitoring for index, something like "ALTER INDEX PK_EMP
> MONITORING USAGE". The usage will be in V$OBJECT_USAGE. Unfortunately,
> there is no owner in that table, so you need to log in as the index owner.
>
> Regards
> On 11/26/20 3:19 PM, Lok P wrote:
>
> We have just moved from Oracle version 11.2.0.4 to 19.3. And also we were
> on HP and now we moved to Exdata-X5. And the team is asking to verify if
> some of the indexes are actually not in use as we are in Exadata and thus
> we can drop them afterwards. So was trying to understand the reliable way
> to achieve the list of unused indexes?
>
> As per my understanding 11.2.0.4 was having option for setting the
> monitoring On for the specific indexes, to see its usage from
> dba_object_usage, but that was just a "YES" or "NO" flag which was not of
> much help(as amount of usage is also not captured there) and also stats
> gathering on the index was making the usage flag to YES which is wrong,
> also indexes on foreign key were not getting picked up as USED in cases.
>
> But i see starting from version 12.2+ , Oracle is by-default capturing all
> the information in a new view DBA_INDEX_USAGE, so wanted to understand from
> experts if this is safe and reliable way to collect index usage information
> or if we have anything new on 19C more reliable for finding index usage?
>
> --
> Mladen Gogala
> Database Consultant
> Tel: (347) 321-1217
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Nov 27 2020 - 08:48:59 CET

Original text of this message