Search code examples
oracletable-statistics

How to update table statistics in Oracle


Removing some records from table in Oracle, how to get statistics (e.g. NUM_ROWS, LAST_ANALYZED) updated?


Solution

  • Gather them, for example

    begin
      dbms_stats.gather_table_stats('SCOTT', 'EMP');
    end;
    /