QuestionQ3

VerifiedManaging Optimizer Statistics

Examine the following statement, which executes successfully on a 19c database:

SELECT CUSTOMER_NAME,COUNT(*),SUM(TOTAL_VALUE)  
  
FROM CUSTOMERS C , SALES -  
WHERE C.CUSTOMER_ID=S.CUSTOMER_ID  
  
GROUP BY CUSTOMER_NAME -  
ORDER BY CUSTOMER_NAME;  
  • The Degree of Parallelism (DOP) is four.
  • Optimizer parameters retain their default settings.
  • The CUSTOMERS table rows processed during execution are only 5% of the number shown in the table statistics.

What happens at execution time?

Explanation

Oracle 19c enables adaptive plans by default, including adaptive parallel distribution. Hybrid hash distribution uses run-time row statistics and switches from hash to broadcast when the row count is below twice the DOP. With DOP 4, that threshold is 8 rows; the low actual cardinality causes the distribution method to switch to broadcast.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!