When the table is large in Partitioned tables, the statistical update process is very long. Although the information we query will take place in several partitions, the query may not result because the table statistics are old.
We can get results in a much shorter time by gathering the relevant partition statistics(update partition statistics) as follows and by specifying the partition in our query rather than the whole table.
1 2 3 4 5 6 7 8 9 10 11 12 | BEGIN SYS.DBMS_STATS.GATHER_TABLE_STATS ( OWNNAME => 'SEMA_ADI', TABNAME => 'TABLO_ADI', PARTNAME => 'PARTITION_ADI', ESTIMATE_PERCENT => 100, METHOD_OPT => 'FOR ALL COLUMNS SIZE AUTO', DEGREE => 4, CASCADE => TRUE, NO_INVALIDATE => FALSE); END; / |