Database Reference
In-Depth Information
■
The
dbms_stats
package isn't the only feature that gathers object statistics. in fact, the
CREATE INDEX
and
ALTER INDEX
statements automatically gather object statistics while building an index. in addition, from version 12.1
onward, CTAS statements and direct-path inserts into empty tables automatically gather object statistics. be aware that
the object statistics computed by the
dbms_stats
package can be superior to ones that are automatically gathered.
Therefore, you can't always rely, in every case, on the automatically gathered statistics.
Note
The procedures provided by the
dbms_stats
package take several parameters that can be grouped into three
main categories. With the first group you specify target objects, with the second group you specify gathering options,
and with the third group you specify whether to back up the current statistics before overwriting them. Table
8-3
summarizes which parameter is available with which procedure. The next three sections describe the scope and use
of each parameter in detail.
Table 8-3.
Parameters of the Procedures Used for Gathering Object Statistics
Parameter
Database
Dictionary
Fixed Objects
Schema
Table
Index
Target Objects
ownname
•
•
•
indname
•
tabname
•
partname
•
•
comp_id
•
granularity
•
•
•
•
•
cascade
•
•
•
•
gather_fixed
•
•
gather_sys
•
gather_temp
•
•
options
•
•
•
•*
objlist
•
•
•
force
•
•
•
obj_filter_list
•
•
•
Gathering Options
estimate_percent
•
•
•
•
•
block_sample
•
•
•
•
method_opt
•
•
•
•
degree
•
•
•
•
•
no_invalidate
•
•
•
•
•
•