What do you infer from the details about these queries?

You work on an online transaction processing (OLTP) database in which the SALES table has 10,000 rows but only four distinct products are sold. View the Exhibit named HIST to check data distribution in the table and the histograms on the table.
View the Exhibit named QUERY-1 that shows details in the V$SQL view for the query executed on the SALES table having product id 1.
Further, you query the SALES table thrice more in the following order:
– query rows having product ID 4
– query rows having product ID 2
– query rows having product ID 4
View the Exhibit named QUERY-n to see the details about these queries.
What do you infer from this?
Exhibit 1 (exhibit):
Exhibit 2 (exhibit):
Exhibit 3 (exhibit):

You work on an online transaction processing (OLTP) database in which the SALES table has 10,000 rows but only four distinct products are sold. View the Exhibit named HIST to check data distribution in the table and the histograms on the table.
View the Exhibit named QUERY-1 that shows details in the V$SQL view for the query executed on the SALES table having product id 1.
Further, you query the SALES table thrice more in the following order:
– query rows having product ID 4
– query rows having product ID 2
– query rows having product ID 4
View the Exhibit named QUERY-n to see the details about these queries.
What do you infer from this?
Exhibit 1 (exhibit):

Exhibit 2 (exhibit):

Exhibit 3 (exhibit):

A.
The second plan was created because the first plan was aged out.

B.
The CURSOR_SHARING parameter value was changed to EXACT after the second query was executed.

C.
The third plan was created because the first plan was aged out and the second plan had different selectivity.

D.
The first two executions used the same plan because at parse time the optimizer did not consider selectivity as the cursor was not yet considered bind-aware.



Leave a Reply 0

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