Hello Moustafa,
1) Maybe you are referring to this one "Statistics at the subpartition level
are gathered and stored by the database, but note that synopses are created at
the partition level only. This means that if the statistics for a subpartition
become stale due to data changes, then the statistics (and synopsis) for the
parent partition will be refreshed by examining all of its subpartitions. The
database only regathers subpartition-level statistics on subpartitions that are
stale." -
https://blogs.oracle.com/optimizer/efficient-statistics-maintenance-for-partitioned-tables-using-incremental-statistics-part-1
- but not quite sure as this talks about subpartitions
Anyway partition statistics are used only in case of partition pruning to one
single partition (and when the partition is known at hard parsing /
optimization time).
2) I guess what you are looking for is
DBMS_STATS.GATHER_TABLE_STATS(granularity => 'GLOBAL') - you can also set it as
default on table level.
Best Regards
Stefan Koehler
Independent Oracle performance consultant and researcher
Website: http://www.soocs.de
Twitter: @OracleSK
Moustafa Ahmed <moustafa_dba@xxxxxxxxxxx> hat am 17.06.2021 20:22 geschrieben:--
Listers
1-on 19c I believe I read before that not gathering partition statics is much
safer specially since 12c and we should be enough with table stats..
Is that true?
2-how can we ignite gathering partition stats for a table?
Thank you!--
//www.freelists.org/webpage/oracle-l