简体   繁体   中英

Oracle 19C dbms_stats.gather_table_stats Slowness and return invalid identifier error

I'm are using Oracle 19C db and used to gather table stats. dbms_stats.gather_table_stats(ownname =>'xx', tabname =>'yyy', cascade=>true, no_invalidate=>false);

it is too slow and some tables return following error as well.

ORA-00904 : invalid identifier.

Can assist find solution for this ? Row count around 80Millions

Can you try this script. With my 19c Db it requires 50s for a table of 140milions rows and 30columns:

DBMS_STATS.GATHER_TABLE_STATS (
   ownname=> 'xx',
   tabname=> 'yyy',
   estimate_percent=> DBMS_STATS.AUTO_SAMPLE_SIZE,
   block_sample=> FALSE,
   method_opt=> 'FOR ALL COLUMNS SIZE AUTO',
   degree=> DBMS_STATS.DEFAULT_DEGREE,
   granularity=> 'ALL',
   cascade=> DBMS_STATS.AUTO_CASCADE,
   no_invalidate=> DBMS_STATS.AUTO_INVALIDATE
   );

If it takes more time then you need verify indexes, triggers and constraints on your table.

Thank you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM