Forum Stats

  • 3,780,466 Users
  • 2,254,398 Discussions
  • 7,879,339 Comments

Discussions

Difference between dba_tables.last_analyzed and dba_tab_stats_history.stats_update

hob
hob Member Posts: 15 Bronze Badge

Hello,

we currenty investigate the work of the automatic statistics job that runs during the standard maintenance windows at night and on weekends.

I've noticed that the automatic statistics job (gather_database_stats (auto)) generates statistics for one table but does not update last_analyzed of dba_tables.

The job detail report (Enterprise Manager) shows:

Target          Type    Start Time                      End Time                      Status

"MM"."VDATA"   TABLE   08.05.21 06:01:00,761681 +02:00   08.05.21 21:08:21,560594 +02:00   COMPLETED


DBA_TAB_STATS_HISTORY shows:

OWNER   TABLE_NAME   STATS_UPDATE_TIME

MM       VDATA       08.05.2021 21:08:20,407373 +02:00


But DBA_TABLES (and DBA_TAB_STATISTICS) show

OWNER   TABLE_NAME   LAST_ANALYZED

MM       VDATA       06.05.2021 08:56:18


Why do last_analyzed of dba_tables and stats_update_time of dba_tab_stats_history differ?

Is this behaviour expected?

We use Oracle EE 19.10.

The automatic statistics job runs with standard parameters.

The parameter optimizer_use_pending_statistics is set to false.

The table is partitioned.


Thank You.

Regards

Holger

Tagged: