1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| > create bitmap index BIJ_Index8
on sales( times.fiscal_year, products.prod_category, customers.cust_marital_status)
from sales, times, customers, products
where sales.time_id=times.time_id
and products.prod_id = sales.prod_id
and customers.cust_id = sales.cust_id ;
Index créé.
> select sales.cust_id, avg(amount_sold)
from sales, customers, products, times
where sales.cust_id = customers.cust_id
and sales.prod_id = products.prod_id
and sales.time_id = times.time_id
and times.fiscal_year ='2000' and
customers.cust_marital_status ='married'
and products.prod_category ='Women'
group by sales.cust_id
Plan d'exécution
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1496 Card=1569 Bytes
=86295)
1 0 SORT (GROUP BY) (Cost=1496 Card=1569 Bytes=86295)
2 1 HASH JOIN (Cost=553 Card=143521 Bytes=7893655)
3 2 TABLE ACCESS (FULL) OF 'CUSTOMERS' (Cost=9 Card=25000
Bytes=275000)
4 2 HASH JOIN (Cost=332 Card=143521 Bytes=6314924)
5 4 TABLE ACCESS (FULL) OF 'PRODUCTS' (Cost=12 Card=2500
Bytes=27500)
6 4 HASH JOIN (Cost=306 Card=288305 Bytes=9514065)
7 6 TABLE ACCESS (FULL) OF 'TIMES' (Cost=2 Card=292 By
tes=3212)
8 6 TABLE ACCESS (FULL) OF 'SALES' (Cost=299 Card=1016
271 Bytes=22357962) |
Partager