QuestionQ60

VerifiedTuning SQL Statements

An Oracle 19c Database has every tuning parameter set to its default value.

Examine the following statement, which executes successfully:

Question Image

Analysis shows that the optimizer incorrectly estimates the query cardinality.

The same WHERE clause occurs in several complex report queries.

The optimizer must use the correct cardinality without affecting other database activity.

Which two actions accomplish this?

Choose two
Explanation

A CARDINALITY hint can explicitly supply a cardinality estimate for a relevant query block without changing instance-wide optimizer behavior. Extended statistics on the (CUST_PROVINCE, COUNTRY_ID) column group capture the relationship between the two predicate columns, enabling accurate combined-predicate cardinality estimates whenever that column combination is used. Oracle documents that column-group statistics improve cardinality estimates for multiple predicates on different columns of the same table.

Learn more

Community Discussion

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