Database Tuning (MOSC)

MOSC Banner

ORA-20006: cannot gather session private statistics for <TABLE_NAME> without truncating the table

edited Aug 29, 2018 8:57PM in Database Tuning (MOSC) 3 commentsAnswered ✓

Oracle 12.1.0.2 SE on Linux (AWS RDS Instance)

Hi,

I currently have an issue when trying to gather privates session stats on global temporary tables. The problem is intermittent and seems to happen when the GTT reaches a certain size. My GTT was created as a transaction level table (on commit delete rows) and stats set to SESSION (not shared). I can gather stats with no problem if the table is less than 22K rows (for example) but as soon as I hit 22K rows, I get the below error when gathering session stats. Is this a bug?

--<INSERT_STATEMENT>21,999 rows inserted.exec dbms_stats.gather_table_stats(USER, 'TABLE_NAME' );PL/SQL procedure successfully completed.--<INSERT_STATEMENT>1 rows inserted.exec dbms_stats.gather_table_stats(USER, 'TABLE_NAME' );ORA-20006: cannot gather session private statistics for <TABLE_NAME> without truncating the table

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