Databases Reference
In-Depth Information
In the following screenshot, we can see the result of these operations, and we can see in the
NOTE
section that dynamic sampling was used for this statement:
In step 9, we use the
DBMS_STATS.IMPORT_SCHEMA_STATS
procedure to import the
statistics data from the
MYSTATS
table in the data dictionary. This operation can be carried
out when we transfer statistics among different databases—export them from one database,
as in step 4 and step 5, and then we can use the
export
utility to transfer the
MYSTATS
table
to the other database and
IMPORT
it. After these operations, we execute the procedure in this
step to populate the data dictionary tables with our statistics.
In step 10, we execute the same query again. In the following screenshot, you can observe
that we have the same execution plan as in step 6, without the use of dynamic sampling as
in step 8: