| Bonnie Baker. Responsible SQL: Creative Solutions for Performance Problems in DB2 for OS/390. DB2 Magazine, 4(2):54-55, Summer 1999. Available at http://www.db2mag.com/summer99/99sp_prog.shtml. |
....chase, universal plan, backchase, minimal plans. 2 Motivating Examples In this section, we illustrate with two examples certain optimizations that one would like to see performed automatically in a database system. Example 2. 1 This is a very simple and common relational scenario adapted from [1], showing the bene ts of exploiting referential integrity constraints. Consider a relation R(A; B; C; E) and a query that selects all tuples in R with given values for attributes B and C: Q) select struct (A = r:A; E = r:E) from R r where r:B = b and r:C = c The relation is very large, but ....
Bonnie Baker. Responsible SQL: Creative Solutions for Performance Problems in DB2 for OS/390. DB2 Magazine, 4(2):54-55, Summer 1999. Available at http://www.db2mag.com/summer99/99sp_prog.shtml.
....may be cheaper than the other. As we shall see, although they are quite different in nature, our optimization algorithm is able to generate systematically all these plans. Example 1.2. 2 (Index use enabled by semantic constraints) This is a very simple and common relational scenario adapted from [Bak99] showing the benefits of exploiting referential integrity constraints. Consider a relation R(A; B; C; E) and a query that asks for all tuples in R with given values for the attributes B and C: Q) select struct (A = r:A; E = r:E) from R r where r:B = b and r:C = c The relation is very ....
....of A are known to be in the set f g, one can hard code in the where clause the condition A in f g and the problem is solved. Of course, this is not a real solution because tomorrow the values for A might change The reader can find several other solutions in [Bak99] but none are satisfactory except one: rewrite Q into an equivalent query that does a join of R with a small table S on attribute A knowing that there is a foreign key constraint from R into S on A: select struct (A = r:A; E = r:E) from R r; S s where r:B = b and r:C = c and r:A = s:A ....
Bonnie Baker. Responsible SQL: Creative Solutions for Performance Problems in DB2 for OS/390. DB2 Magazine, 4(2):54--55, Summer 1999. Available at http://www.db2mag.com/summer99/99sp prog.shtml.
....in 3 have been relegated to appendices B and C. 2 Motivating Examples In this section, we illustrate with two examples certain optimizations that one would like to see performed automatically in a database system. Example 2. 1 This is a very simple and common relational scenario adapted from [2], showing the bene ts of exploiting referential integrity constraints. Consider a relation R(A; B; C; E) and a query that asks for all tuples in R with given values for attributes B and C: Q) select struct (A = r:A; E = r:E) from R r where r:B = b and r:C = c The relation is very large, but ....
....0 03 0 ; 0 04 0 g, one can hard code in the where clause the condition A in f 0 01 0 ; 0 02 0 ; 0 03 0 ; 0 04 0 g and the problem is solved. Of course, this is not a real solution because tomorrow the values for A might change The reader can nd several other solutions in [2] but none are satisfactory except one: rewrite Q into an equivalent query that does a join of R with a small table S on attribute A knowing that there is a foreign key constraint from R into S on A: Q 0 ) select struct (A = r:A; E = r:E) from R r; S s where r:B = b and r:C = c and r:A = s:A ....
[Article contains additional citation context not shown here]
Bonnie Baker. Responsible SQL: Creative Solutions for Performance Problems in DB2 for OS/390. DB2 Magazine, 4(2):54-55, Summer 1999. Available at http://www.db2mag.com/summer99/99sp_prog.shtml.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC