You can also choose
to estimate statistics based on a specified percentage of the table??™s rows.
Implications of the COMPUTE STATISTICS Option
In the examples in the preceding section, the compute statistics option was used to gather
statistics about objects. Oracle also provides the estimate statistics option, which bases the
object??™s statistics on a review of a portion of the data. If you choose to use estimate statistics,
analyze as much of the table as possible. You can specify a percentage of the rows to analyze??”
analyzing 20 percent is usually sufficient.
TIP
The availability of the analyze table . . . compute statistics or analyze
table . . . estimate statistics command outside of the DBMS_STATS
package may be removed in a future release of Oracle; use the
analyze command for non-statistics-related tasks such as validate
structure or list chained rows, or else to collect information on freelist
blocks.
Analyzing data can require large amounts of sort space. Because the analysis may include
full table scans as well, you should change your session settings immediately prior to starting the
analysis. When the analysis completes, either end your session or change your settings back to
the database??™s values. The session settings to change are those for SORT_AREA_SIZE and DB_
FILE_MULTIBLOCK_READ_COUNT. As of Oracle Database 10g, Oracle strongly suggests using
PGA_AGGREGATE_TARGET to automatically manage the value of SORT_AREA_SIZE.
Pages:
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434