Presentation is loading. Please wait.

Presentation is loading. Please wait.

INLIST ITERATOR erscheint im Execution Plan, wenn der zugegriffene Index ´ IN list ` implementiert also bei Bedingungen wie.. WHERE N.N_NAME IN (´PERU`,

Similar presentations


Presentation on theme: "INLIST ITERATOR erscheint im Execution Plan, wenn der zugegriffene Index ´ IN list ` implementiert also bei Bedingungen wie.. WHERE N.N_NAME IN (´PERU`,"— Presentation transcript:

1 INLIST ITERATOR erscheint im Execution Plan, wenn der zugegriffene Index ´ IN list ` implementiert also bei Bedingungen wie.. WHERE N.N_NAME IN (´PERU`, ´BRAZIL`, ´ARGENTINA`).... WHERE O.O_DATE IN (´01.03.95`, `02.03.95´)..  SELECT STATEMENT INLIST ITERATOR TABLE ACCESS BY ROWID NATION INDEX RANGE SCAN IDX_NATION_CUSTNAME

2 COSTS COST.. the value of this column does not have any particular unit of measurement, it is merely a weighted value used to compare costs of execution plans. CARDINALITY the estimate by the cost-based approach of the number of rows accessed by the operation. BYTES the estimate by the cost-based approach of the number of bytes accessed by the operation.

3 DBMS_STATS package Von DBMS_STATS erstellte Statistiken umfassen: –Table statistics oNumber of rows oNumber of blocks oAverage row length –Column statistics oNumber of distinct values (NDV) in column oNumber of nulls in column oData distribution (histogram) –Index statistics oNumber of leaf blocks oLevels oClustering factor –System statistics oI/O performance and utilization oCPU performance and utilization ANALYZE table COMPUTE STATISTICS;

4 Nicht optimierte Pläne Execution Plan für Q1.1 ohne Materialized Views: SELECT STATEMENT Cost = 3481 HASH JOIN TABLE ACCESS FULL NATION TABLE ACCESS FULL CUSTOMER TABLE ACCESS FULL ORDERS Execution Plan für Q2.3 ohne Materialized Views: SELECT STATEMENT Cost = 771018 SORT ORDER BY SORT GROUP BY HASH JOIN TABLE ACCESS FULL PART HASH JOIN TABLE ACCESS FULL SUPPLIER HASH JOIN INDEX FAST FULL SCAN SYS_C0012879 HASH JOIN TABLE ACCESS FULL ORDERS INDEX FAST FULL SCAN SYS_C0012882

5 Optimiertere Pläne Execution Plan für Q1.1 mit Materialized Views: SELECT STATEMENT Cost = 132 HASH JOIN TABLE ACCESS FULL MV1 INDEX FAST FULL SCAN OTPRICE_OSTAT_CKEY_OKEY; Execution Plan für Q1.5 mit Materialized Views: SELECT STATEMENT Cost = 26 HASH JOIN TABLE ACCESS FULL MV3 TABLE ACCESS FULL MV1

6 Table/Index Stats Enter value for owner (RETURN for ALL) > gruppe1 Enter value for table name (RETURN for ALL) > MV1 Table Stats: GRUPPE3.TEST_VIEW1 NUM_ROWS 449999 Table Stats: GRUPPE3.TEST_VIEW1 BLKS 5387 Table Stats: GRUPPE3.TEST_VIEW1 AVG_ROW_LEN 92 [..] Col Stats: TEST_VIEW1.O_TOTALPRICE DISTCNT 446631 Col Stats: TEST_VIEW1.O_TOTALPRICE DENSITY.0000022389847547528 Col Stats: TEST_VIEW1.O_TOTALPRICE NULLCNT 0 Col Stats: TEST_VIEW1.O_TOTALPRICE AVGCLEN 5 Col Stats: TEST_VIEW1.O_ORDERSTATUS DISTCNT 3 Col Stats: TEST_VIEW1.O_ORDERSTATUS DENSITY.333333333333333 Col Stats: TEST_VIEW1.O_ORDERSTATUS NULLCNT 0 Col Stats: TEST_VIEW1.O_ORDERSTATUS AVGCLEN 1 PL/SQL procedure successfully completed... wir nehmen NUM_ROWS * AVG_ROW_LEN


Download ppt "INLIST ITERATOR erscheint im Execution Plan, wenn der zugegriffene Index ´ IN list ` implementiert also bei Bedingungen wie.. WHERE N.N_NAME IN (´PERU`,"

Similar presentations


Ads by Google