bonjour,
j’ai la requête suivante
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 explain plan for(select 
     sum(lo_extendedprice*lo_discount) as revenue
 from 
     lineorder, dates
 where 
     lo_orderdate = d_datekey
     and d_year = 1993
     and lo_discount between 1 and 3
 and lo_quantity < 25);
et puis pour voir le plan estimé je mets le code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
select plan_table_output from table(dbms_xplan.display());
j'ai obtenu le plan suivant:
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 2553672856

--------------------------------------------------------------------------------
-

| Id  | Operation           | Name      | Rows  | Bytes | Cost (%CPU)| Time
|

--------------------------------------------------------------------------------
-


PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
|   0 | SELECT STATEMENT    |           |     1 |    28 | 18353   (4)| 00:03:41
|

|   1 |  SORT AGGREGATE     |           |     1 |    28 |            |
|

|*  2 |   HASH JOIN         |           |   142K|  3893K| 18353   (4)| 00:03:41
|

|*  3 |    TABLE ACCESS FULL| DATES     |   365 |  3650 |    11   (0)| 00:00:01
|

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------

|*  4 |    TABLE ACCESS FULL| LINEORDER |   948K|    16M| 18324   (4)| 00:03:40
|

--------------------------------------------------------------------------------
-


Predicate Information (identified by operation id):
---------------------------------------------------


PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
   2 - access("LO_ORDERDATE"="D_DATEKEY")
   3 - filter("D_YEAR"=1993)
   4 - filter("LO_DISCOUNT"<=3 AND "LO_QUANTITY"<25 AND "LO_DISCOUNT">=1)

18 ligne(s) sélectionnée(s).
j'ai pas compris le fonctionnent le plan. je veux votre aide
Merci