Database Administration (MOSC)

MOSC Banner

gather_table_stats doesn't gather related index stats properly when pending stats are enabled

Hello community,

I had found a wired behaviour of gather_table_stats with a pending table where related index stats are not properly gathered with cascade option, specifically num_rows of index stats become 0 even when the table has more than one rows. I knew the issue could happen more than a year ago in 19c but couldn't reproduce it and gave up to investigate further. Recently I was succeeded to reproduce the issue and would like to share it as follows. This happens only when gathering statistics (with cascade option true) of a table with num_rows=0, pending stats enabled.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center