Download presentation
Presentation is loading. Please wait.
1
CPSC-608 Database Systems
Fall 2018 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #15
2
What Does DBMS Do? understand the program P
An input database program P understand the program P parse tree translate the program P into an expression E in relational algebra logic query plan convert E into an algorithm using algorithms in the collection C Machine executable code
3
subqueries in the FROM clause
subqueries in the FROM clause \\ Parse tree to Exp tree: for SFW 1. create a π node; 2. collect the attributes in child-2 and attach them to the π node; 3. IF child-5 ≠ NULL THEN create a σ node and make it the child of the π node; get the conditions in child-6 and attach it to the σ node; 4. create a × node and make it the child of the σ node; 5. make the tables in child-4 the children of the × node; 6. IF child-7 ≠ NULL THEN … SELECT c FROM S(a,b), (SELECT * FROM T(b,c) WHERE c = 10) t WHERE S.b = t.b AND a>4; <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <tbl-name> , <tbl-list> <b-term> <column-name> S(a,b) <tbl-name> <b-facor> <b-term> and c <b-primary> <b-facor> S(a,b) t c × π σ S.b=t.b AND a>4 <comp-pred> <b-primary> <exp> <co-op> <exp> <comp-pred> <term> <term> = <exp> <co-op> <exp> <column-name> <column-name> <term> <term> > S.b T.b <column-name> <integer> a 4 parse tree for (SELECT * FROM T(b,c) WHERE c = 10) t logic plan for (SELECT * FROM T(b,c) WHERE c = 10) t
4
subqueries in the WHERE clause
5
subqueries in the WHERE clause
subqueries in the WHERE clause SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ;
6
subqueries in the WHERE clause
subqueries in the WHERE clause SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ;
7
subqueries in the WHERE clause
subqueries in the WHERE clause SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; \\ Parse tree to Exp tree: for SFW 1. create a π node; 2. collect the attributes in child-2 and attach them to the π node; 3. IF child-5 ≠ NULL THEN create a σ node and make it the child of the π node; get the conditions in child-6 and attach it to the σ node; 4. create a × node and make it the child of the σ node; 5. make the tables in child-4 the children of the × node; 6. IF child-7 ≠ NULL THEN … Can we make a logic query plan like this? S(a,b) b π σ S.a > ANY (SELECT c FROM T(c,d) WHERE d= 10)
8
subqueries in the WHERE clause
subqueries in the WHERE clause SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; \\ Parse tree to Exp tree: for SFW 1. create a π node; 2. collect the attributes in child-2 and attach them to the π node; 3. IF child-5 ≠ NULL THEN create a σ node and make it the child of the π node; get the conditions in child-6 and attach it to the σ node; 4. create a × node and make it the child of the σ node; 5. make the tables in child-4 the children of the × node; 6. IF child-7 ≠ NULL THEN … Can we make a logic query plan like this? S(a,b) b π σ S.a > ANY (SELECT c FROM T(c,d) WHERE d= 10) NO! Conditions in σ involved in subqueries can cause significant inefficiency and/or even logic inconsistency
9
Then what will we do? subqueries in the WHERE clause
subqueries in the WHERE clause SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; \\ Parse tree to Exp tree: for SFW 1. create a π node; 2. collect the attributes in child-2 and attach them to the π node; 3. IF child-5 ≠ NULL THEN create a σ node and make it the child of the π node; get the conditions in child-6 and attach it to the σ node; 4. create a × node and make it the child of the σ node; 5. make the tables in child-4 the children of the × node; 6. IF child-7 ≠ NULL THEN … Can we make a logic query plan like this? S(a,b) b π σ S.a > ANY (SELECT c FROM T(c,d) WHERE d= 10) Then what will we do?
10
subqueries in the WHERE clause
subqueries in the WHERE clause EXIST R s IN R s > ALL R s > ANY R SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ;
11
subqueries in the WHERE clause
subqueries in the WHERE clause EXIST R s IN R s > ALL R s > ANY R SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; Each operation has a different conversion procedure. In general, Convert the subquery into a logic plan; Collect the attributes for the condition; Make a cross product with the “main” relations; Apply the conditions in the cross product.
12
subqueries in the WHERE clause
subqueries in the WHERE clause 1. Convert the subquery into a logic plan; 2. Collect the attributes for the condition; 3. Make a cross product with the “main” relations; 4. Apply the conditions in the cross product. SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ;
13
subqueries in the WHERE clause
subqueries in the WHERE clause 1. Convert the subquery into a logic plan; 2. Collect the attributes for the condition; 3. Make a cross product with the “main” relations; 4. Apply the conditions in the cross product. SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <tbl-name> <b-term> <column-name> <b-facor> S(a,b) b <b-primary> <comp-pred> <exp> <co-op> <exp> <term> > any <column-name> S.a Parse tree for SELECT c FROM T(c,d) WHERE d = 10
14
subqueries in the WHERE clause
subqueries in the WHERE clause 1. Convert the subquery into a logic plan; 2. Collect the attributes for the condition; 3. Make a cross product with the “main” relations; 4. Apply the conditions in the cross product. SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <tbl-name> <b-term> <column-name> <b-facor> S(a,b) b <b-primary> <comp-pred> <exp> <co-op> <exp> <term> > any <column-name> S.a Parse tree for SELECT c FROM T(c,d) WHERE d = 10 logic plan for SELECT c FROM T(c,d) WHERE d = 10
15
subqueries in the WHERE clause
subqueries in the WHERE clause 1. Convert the subquery into a logic plan; 2. Collect the attributes for the condition; 3. Make a cross product with the “main” relations; 4. Apply the conditions in the cross product. SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <tbl-name> <b-term> <column-name> <b-facor> S(a,b) b <b-primary> <comp-pred> σ d = 10 c π T(c,d) <exp> <co-op> <exp> <term> > any <column-name> S.a Parse tree for SELECT c FROM T(c,d) WHERE d = 10 logic plan for SELECT c FROM T(c,d) WHERE d = 10
16
subqueries in the WHERE clause
subqueries in the WHERE clause 1. Convert the subquery into a logic plan; 2. Collect the attributes for the condition; 3. Make a cross product with the “main” relations; 4. Apply the conditions in the cross product. SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <tbl-name> <b-term> <column-name> <b-facor> S(a,b) b <b-primary> × <comp-pred> σ d = 10 c π T(c,d) S(a,b) <exp> <co-op> <exp> <term> > any <column-name> S.a Parse tree for SELECT c FROM T(c,d) WHERE d = 10 logic plan for SELECT c FROM T(c,d) WHERE d = 10
17
subqueries in the WHERE clause
subqueries in the WHERE clause 1. Convert the subquery into a logic plan; 2. Collect the attributes for the condition; 3. Make a cross product with the “main” relations; 4. Apply the conditions in the cross product. SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; <statement> <select-statement> b π select <select-list> from <tbl-list> where <search-condition> <select-sublist> <tbl-name> <b-term> σ S.a > U.c <column-name> <b-facor> S(a,b) b <b-primary> × <comp-pred> σ d = 10 c π T(c,d) S(a,b) <exp> <co-op> <exp> <term> > any <column-name> S.a Parse tree for SELECT c FROM T(c,d) WHERE d = 10 logic plan for SELECT c FROM T(c,d) WHERE d = 10
18
subqueries in the WHERE clause
subqueries in the WHERE clause 1. Convert the subquery into a logic plan; 2. Collect the attributes for the condition; 3. Make a cross product with the “main” relations; 4. Apply the conditions in the cross product. SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; <statement> <select-statement> b π select <select-list> from <tbl-list> where <search-condition> <select-sublist> <tbl-name> <b-term> σ S.a > U.c <column-name> <b-facor> S(a,b) b <b-primary> × <comp-pred> σ d = 10 c π T(c,d) S(a,b) <exp> <co-op> <exp> <term> > any <column-name> S.a Parse tree for SELECT c FROM T(c,d) WHERE d = 10
19
subqueries in the WHERE clause
subqueries in the WHERE clause 1. Convert the subquery into a logic plan; 2. Collect the attributes for the condition; 3. Make a cross product with the “main” relations; 4. Apply the conditions in the cross product. SELECT b FROM S(a,b) WHERE S.a > ANY (SELECT c FROM T(c,d) WHERE d = 10) ; <statement> <select-statement> b π select <select-list> from <tbl-list> where <search-condition> <select-sublist> <tbl-name> <b-term> σ S.a > U.c <column-name> <b-facor> S(a,b) b <b-primary> × <comp-pred> S(a,b) δ <exp> <co-op> <exp> σ d = 10 c π T(c,d) <term> > any <column-name> S.a Parse tree for SELECT c FROM T(c,d) WHERE d = 10
20
What Does DBMS Do? √ understand the program P
An input database program P understand the program P parse tree translate the program P into an expression E in relational algebra √ logic query plan convert E into an algorithm using algorithms in the collection C Machine executable code
21
What Does DBMS Do? √ understand the program P
An input database program P understand the program P View processing, Semantic checking parse tree preprocessing parse tree translate the program P into an expression E in relational algebra √ logic query plan convert E into an algorithm using algorithms in the collection C Machine executable code
22
View Processing
23
View Processing CREATE VIEW V AS SELECT a, b FROM T(a,g), U(h,b)
WHERE T.g > U.h
24
View Processing CREATE VIEW V AS SELECT a, b FROM T(a,g), U(h,b)
<statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <tbl-name> T(a,g) <b-term> <b-facor> <b-primary> <comp-pred> <exp> <co-op> <term> T.g <column-name> <select-sublist> b > , a U.h CREATE VIEW V AS SELECT a, b FROM T(a,g), U(h,b) WHERE T.g > U.h
25
View Processing SELECT a, d FROM V(a,b), S(c,d) WHERE V.b = S.c
U(h,b) <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <tbl-name> T(a,g) <b-term> <b-facor> <b-primary> <comp-pred> <exp> <co-op> <term> T.g <column-name> <select-sublist> b > , a U.h SELECT a, d FROM V(a,b), S(c,d) WHERE V.b = S.c CREATE VIEW V AS SELECT a, b FROM T(a,g), U(h,b) WHERE T.g > U.h
26
View Processing V is a view SELECT a, d FROM V(a,b), S(c,d)
U(h,b) <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <tbl-name> T(a,g) <b-term> <b-facor> <b-primary> <comp-pred> <exp> <co-op> <term> T.g <column-name> <select-sublist> b > , a U.h V is a view SELECT a, d FROM V(a,b), S(c,d) WHERE V.b = S.c CREATE VIEW V AS SELECT a, b FROM T(a,g), U(h,b) WHERE T.g > U.h
27
View Processing V is a view SELECT a, d FROM V(a,b), S(c,d)
U(h,b) <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <tbl-name> T(a,g) <b-term> <b-facor> <b-primary> <comp-pred> <exp> <co-op> <term> T.g <column-name> <select-sublist> b > , a U.h V is a view SELECT a, d FROM V(a,b), S(c,d) WHERE V.b = S.c <statement> <select-statement> select <select-list> from <tbl-list> where , <column-name> , <search-condition> <tbl-name> <tbl-list> <select-sublist> a <b-term> V(a,b) <tbl-name> <column-name> <b-facor> d S(c,d) <b-primary> <comp-pred> CREATE VIEW V AS SELECT a, b FROM T(a,g), U(h,b) WHERE T.g > U.h <exp> <co-op> <exp> <term> = <term> <column-name> V.b S.c
28
View Processing V is a view SELECT a, d FROM V(a,b), S(c,d)
U(h,b) <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <tbl-name> T(a,g) <b-term> <b-facor> <b-primary> <comp-pred> <exp> <co-op> <term> T.g <column-name> <select-sublist> b > , a U.h V is a view SELECT a, d FROM V(a,b), S(c,d) WHERE V.b = S.c <statement> <select-statement> select <select-list> from <tbl-list> where , <column-name> , <search-condition> <tbl-name> <tbl-list> <select-sublist> a <b-term> V(a,b) <tbl-name> <column-name> <b-facor> d S(c,d) <b-primary> <comp-pred> CREATE VIEW V AS SELECT a, b FROM T(a,g), U(h,b) WHERE T.g > U.h <exp> <co-op> <exp> <term> = <term> <column-name> V.b S.c
29
View Processing V is a view replace it by its parse tree SELECT a, d
U(h,b) <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <tbl-name> T(a,g) <b-term> <b-facor> <b-primary> <comp-pred> <exp> <co-op> <term> T.g <column-name> <select-sublist> b > , a U.h V is a view SELECT a, d FROM V(a,b), S(c,d) WHERE V.b = S.c <statement> <select-statement> select <select-list> from <tbl-list> where , <column-name> , <search-condition> <tbl-name> <tbl-list> <select-sublist> a <b-term> V(a,b) <tbl-name> <column-name> <b-facor> d S(c,d) <b-primary> <comp-pred> CREATE VIEW V AS SELECT a, b FROM T(a,g), U(h,b) WHERE T.g > U.h <exp> <co-op> <exp> replace it by its parse tree <term> = <term> <column-name> V.b S.c
30
View Processing V is a view SELECT a, d FROM V(a,b), S(c,d)
U(h,b) <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <tbl-name> T(a,g) <b-term> <b-facor> <b-primary> <comp-pred> <exp> <co-op> <term> T.g <column-name> <select-sublist> b > , a U.h V is a view SELECT a, d FROM V(a,b), S(c,d) WHERE V.b = S.c <statement> <select-statement> select <select-list> from <tbl-list> where , <column-name> , <tbl-list> <search-condition> <tbl-name> <select-sublist> a <b-term> V(a,b) <tbl-name> <column-name> <b-facor> U(h,b) <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <tbl-name> T(a,g) <b-term> <b-facor> <b-primary> <comp-pred> <exp> <co-op> <term> T.g <column-name> <select-sublist> b > , a U.h d S(c,d) <b-primary> <comp-pred> CREATE VIEW V AS SELECT a, b FROM T(a,g), U(h,b) WHERE T.g > U.h <exp> <co-op> <exp> <column-name> <term> = <term> <column-name> V.b S.c
31
View Processing V is a view Therefore, for each CREATE VIEW
U(h,b) <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <tbl-name> T(a,g) <b-term> <b-facor> <b-primary> <comp-pred> <exp> <co-op> <term> T.g <column-name> <select-sublist> b > , a U.h V is a view SELECT a, d FROM V(a,b), S(c,d) WHERE V.b = S.c <statement> <select-statement> select <select-list> from <tbl-list> where , <column-name> , <search-condition> <tbl-name> <tbl-list> <select-sublist> a <b-term> V(a,b) <tbl-name> <column-name> <b-facor> U(h,b) <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <tbl-name> T(a,g) <b-term> <b-facor> <b-primary> <comp-pred> <exp> <co-op> <term> T.g <column-name> <select-sublist> b > , a U.h d S(c,d) <b-primary> <comp-pred> CREATE VIEW V AS SELECT a, b FROM T(a,g), U(h,b) WHERE T.g > U.h <exp> <co-op> <exp> <column-name> <term> = <term> <column-name> V.b S.c Therefore, for each CREATE VIEW statement, construct its parse tree. In the parse tree for a statement that uses the view, replace the view name with the parse tree for the view.
32
What Does DBMS Do? √ √ understand the program P
An input database program P understand the program P View processing, Semantic checking parse tree √ preprocessing parse tree translate the program P into an expression E in relational algebra √ logic query plan convert E into an algorithm using algorithms in the collection C Machine executable code
33
What Does DBMS Do? √ √ √ understand the program P
An input database program P √ understand the program P View processing, Semantic checking parse tree √ preprocessing parse tree translate the program P into an expression E in relational algebra √ logic query plan convert E into an algorithm using algorithms in the collection C Machine executable code
34
parse tree-lqp convertor
What Does DBMS Do? An input database program P View processing, Semantic checking parser parse tree preprocessing parse tree parse tree-lqp convertor logic query plan Lqp-pqp convertor physical query plan Machine executable code
35
parse tree-lqp convertor
What Does DBMS Do? An input database program P SELECT c FROM S(a,b), T(b,c) WHERE S.b = T.b AND a>4; View processing, Semantic checking parser parse tree preprocessing parse tree parse tree-lqp convertor logic query plan Lqp-pqp convertor physical query plan Machine executable code
36
parse tree-lqp convertor
What Does DBMS Do? An input database program P SELECT c FROM S(a,b), T(b,c) WHERE S.b = T.b AND a>4; View processing, Semantic checking parser <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <column-name> <tbl-name> , S(a,b) <b-term> <b-facor> and T(b,c) <b-primary> <comp-pred> <exp> <co-op> = <term> <factor> S.b T.b > a 4 <integer> parse tree preprocessing parse tree parse tree-lqp convertor logic query plan Lqp-pqp convertor physical query plan Machine executable code
37
parse tree-lqp convertor
What Does DBMS Do? An input database program P SELECT c FROM S(a,b), T(b,c) WHERE S.b = T.b AND a>4; View processing, Semantic checking parser <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <column-name> <tbl-name> , S(a,b) <b-term> <b-facor> and T(b,c) <b-primary> <comp-pred> <exp> <co-op> = <term> <factor> S.b T.b > a 4 <integer> parse tree preprocessing parse tree parse tree-lqp convertor S(a,b) T(b,c) c × π σ S.b=T.b AND a>4 logic query plan Lqp-pqp convertor physical query plan Machine executable code
38
parse tree-lqp convertor
What Does DBMS Do? An input database program P SELECT c FROM S(a,b), T(b,c) WHERE S.b = T.b AND a>4; Prepare a collection A of efficient algorithms for operations in relational algebra; View processing, Semantic checking parser <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <column-name> <tbl-name> , S(a,b) <b-term> <b-facor> and T(b,c) <b-primary> <comp-pred> <exp> <co-op> = <term> <factor> S.b T.b > a 4 <integer> parse tree preprocessing parse tree parse tree-lqp convertor S(a,b) T(b,c) c × π σ S.b=T.b AND a>4 logic query plan Lqp-pqp convertor physical query plan Machine executable code
39
parse tree-lqp convertor
What Does DBMS Do? An input database program P SELECT c FROM S(a,b), T(b,c) WHERE S.b = T.b AND a>4; Prepare a collection A of efficient algorithms for operations in relational algebra; View processing, Semantic checking parser <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <column-name> <tbl-name> , S(a,b) <b-term> <b-facor> and T(b,c) <b-primary> <comp-pred> <exp> <co-op> = <term> <factor> S.b T.b > a 4 <integer> parse tree preprocessing parse tree parse tree-lqp convertor S(a,b) T(b,c) c × π σ S.b=T.b AND a>4 logic query plan output Lqp-pqp convertor Projection(c) physical query plan Select(S.b=T.b & a>4) Alg-CrossProd Machine executable code ScanTable(S(a,b)) ScanTable(T(b,c))
40
parse tree-lqp convertor
What Does DBMS Do? An input database program P SELECT c FROM S(a,b), T(b,c) WHERE S.b = T.b AND a>4; Prepare a collection A of efficient algorithms for operations in relational algebra; View processing, Semantic checking parser <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <column-name> <tbl-name> , S(a,b) <b-term> <b-facor> and T(b,c) <b-primary> <comp-pred> <exp> <co-op> = <term> <factor> S.b T.b > a 4 <integer> parse tree preprocessing parse tree parse tree-lqp convertor S(a,b) T(b,c) c × π σ S.b=T.b AND a>4 logic query plan output Lqp-pqp convertor Projection(c) physical query plan In general a pretty bad algorithm Select(S.b=T.b & a>4) Alg-CrossProd Machine executable code ScanTable(S(a,b)) ScanTable(T(b,c))
41
parse tree-lqp convertor
What Does DBMS Do? An input database program P SELECT c FROM S(a,b), T(b,c) WHERE S.b = T.b AND a>4; Prepare a collection A of efficient algorithms for operations in relational algebra; View processing, Semantic checking parser <statement> <select-statement> select <select-list> from <tbl-list> where <search-condition> <select-sublist> <column-name> <tbl-name> , S(a,b) <b-term> <b-facor> and T(b,c) <b-primary> <comp-pred> <exp> <co-op> = <term> <factor> S.b T.b > a 4 <integer> parse tree preprocessing parse tree parse tree-lqp convertor S(a,b) T(b,c) c × π σ S.b=T.b AND a>4 logic query plan output Lqp-pqp convertor Projection(c) take care of issues in optimization and security. physical query plan In general a pretty bad algorithm Select(S.b=T.b & a>4) Alg-CrossProd Machine executable code ScanTable(S(a,b)) ScanTable(T(b,c))
42
parse tree-lqp convertor
Query Optimization An input database program P Prepare a collection A of efficient algorithms for operations in relational algebra; parser parse tree preprocessing View processing, Semantic checking parse tree-lqp convertor logic query plan Lqp-pqp convertor take care of issues in optimization and security. physical query plan Machine executable code
43
parse tree-lqp convertor
Query Optimization An input database program P Prepare a collection A of efficient algorithms for operations in relational algebra; parser View processing, Semantic checking parse tree preprocessing parse tree parse tree-lqp convertor logic query plan push selections, group joins apply logic laws logic query plan Lqp-pqp convertor take care of issues in optimization and security. physical query plan Machine executable code
44
parse tree-lqp convertor
Query Optimization An input database program P Prepare a collection A of efficient algorithms for operations in relational algebra; parser View processing, Semantic checking parse tree preprocessing parse tree parse tree-lqp convertor logic query plan push selections, group joins apply logic laws logic query plan reduce the size of intermediate results Optimization via logic and size logic query plan Lqp-pqp convertor take care of issues in optimization and security. physical query plan Machine executable code
45
parse tree-lqp convertor
Query Optimization An input database program P Prepare a collection A of efficient algorithms for operations in relational algebra; parser View processing, Semantic checking parse tree preprocessing parse tree parse tree-lqp convertor logic query plan push selections, group joins apply logic laws logic query plan reduce the size of intermediate results Optimization via logic and size logic query plan Lqp-pqp convertor take care of issues in optimization and security. physical query plan choices of algorithms, data structures, and computational modes Optimization via algorithms and cost Machine executable code
46
parse tree-lqp convertor
Query Optimization An input database program P Prepare a collection A of efficient algorithms for operations in relational algebra; parser View processing, Semantic checking parse tree preprocessing parse tree parse tree-lqp convertor logic query plan push selections, group joins apply logic laws logic query plan reduce the size of intermediate results Optimization via logic and size logic query plan Lqp-pqp convertor take care of issues in optimization and security. physical query plan choices of algorithms, data structures, and computational modes Optimization via algorithms and cost Machine executable code
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.