GATHERDATABASESTATS
GATHERDATABASESTATS is a database maintenance operation designed to collect statistics about database objects in order to support the query optimizer's ability to generate efficient execution plans. It updates metadata about tables, indexes, and other objects, which the optimizer uses to estimate cardinalities, selectivity, and plan costs.
In Oracle databases, the closest built-in equivalent is DBMS_STATS.GATHER_DATABASE_STATS, which gathers statistics across all schemas and
Scope and data collected: It gathers table and index statistics such as number of rows, number of
Usage: Typically run by database administrators as part of regular maintenance or after large data changes.
Impact and best practices: The operation is resource-intensive and can temporarily affect performance. It is usually
See also: DBMS_STATS, Oracle Database, optimizer statistics, histogram statistics.