




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





delete plan_table; explain plan for select name from country where population > 10000000 ; Explained select substr(lpad(' ', level – 1) || operation || ' (' || options || ')', 1, 30) “Operation”, object_name “Object” from plan_table start with id = 0 connect by prior id = parent_id; _Operation Object
SELECT STATEMENT () TABLE ACCESS (FULL) COUNTRY_
1 4 5 6 9 11 table R 1 4 5 6 9 11 3 table R 1 occurrence file (^) size of the result: n(σ(R.A=c))=SC(A,r)=n(r) / V(A,r)
A6: Primary index on key: ● (^) search for A=c; then pick tuples with A >= c ● (^) cost = (height + 1) + b(r)/2 w/o a bound constant c ● (^) = -”- + n(r) (max(A,r)-c)/(max(A,r)-min(A,r))/f(r) ● (^) Primary (clustering) index on non-key: ● (^) cost = as above (all tuples with the same value are clustered) A7: Secondary (non-clustering) index ● (^) cost = (height + 1) + B-treeLeaves/2 + n(r)/2 or ● (^) = -”- + -”- + ● (^) + {1 + SC(A,r)}((max(A,r)-c) tuples with the same value are scattered can be more expensive than file scan 1 4 5 6 9 11 3 table R 1 occurrence file 1 4 5 6 9 11 table R 1 4 5 6 9 11 3 table R 1 occurrence file ● (^) size of the result: n(σ(R.A>c))= [max(A,r)-c] * n(r) / [max(A,r) - min(A,r)]