Which statement is correct regarding the above statistics collection on the SH.CUSTOMERS table in the above session?

You executed the following commands:
SQL> ALTER SESSION SET OPTIMIZER_USE_PENDING_STATISTICS = false;
SQL> EXECUTE DBMS_STATS.SET_TABLE_PREFS(‘SH’, ‘CUSTOMERS’,
‘PUBLISH’,’false’);
SQL> EXECUTE DBMS_STATS.GATHER_TABLE_STATS(‘SH’, ‘CUSTOMERS’);
Which statement is correct regarding the above statistics collection on the SH.CUSTOMERS
table in the above session?

You executed the following commands:
SQL> ALTER SESSION SET OPTIMIZER_USE_PENDING_STATISTICS = false;
SQL> EXECUTE DBMS_STATS.SET_TABLE_PREFS(‘SH’, ‘CUSTOMERS’,
‘PUBLISH’,’false’);
SQL> EXECUTE DBMS_STATS.GATHER_TABLE_STATS(‘SH’, ‘CUSTOMERS’);
Which statement is correct regarding the above statistics collection on the SH.CUSTOMERS
table in the above session?

A.
The statistics are stored in the pending statistics table in the data dictionary.

B.
The statistics are treated as the current statistics by the optimizer for all sessions.

C.
The statistics are treated as the current statistics by the optimizer for the current sessions
only.

D.
The statistics are temporary and used by the optimizer for all sessions until this session
terminates.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Jake from SF

Jake from SF

A is correct:

http://www.oracle.com/technetwork/database/bi-datawarehousing/gathstats-090196.html

Testing Pending Statistics
All the statistics on the CUSTOMERS_OBE table are pending. If you wanted to test the new statistics, you could export them from the pending statistics table and import them into a test system. If they were found to be unacceptable, you could simply delete them from the pending statistics tables without affecting production. Perform the following steps:

1.
You need to turn off the use of pending statistics by executing the following script:

@set_pending_stats_off

The set_pending_stats_off.sql code is as follows:

alter session set optimizer_use_pending_statistics = false;

alter session set optimizer_dynamic_sampling = 0;