%!PS-Adobe-2.0 %%Creator: dvips 5.521 Copyright 1986, 1993 Radical Eye Software %%Title: paper.dvi %%CreationDate: Fri May 20 20:04:27 1994 %%Pages: 25 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%DocumentFonts: Times-Bold Times-Roman Times-Italic Courier %%EndComments %DVIPSCommandLine: dvips paper -o %DVIPSSource: TeX output 1994.05.20:2003 %%BeginProcSet: tex.pro /TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N /X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72 mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1} ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR matrix currentmatrix dup dup 4 get round 4 exch put dup dup 5 get round 5 exch put setmatrix}N /@landscape{/isls true N}B /@manualfeed{ statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{/nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /E{ pop nn dup definefont setfont}B /ch-width{ch-data dup length 5 sub get} B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]{ ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{]}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{cc 1 add D }B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin 0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore showpage userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X /IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for 65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V {}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7 getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false} ifelse}{false}ifelse end{{gsave TR -.1 -.1 TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR -.1 -.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave transform round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail} B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{ 3 M}B /k{4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{ 3 2 roll p a}B /bos{/SS save N}B /eos{SS restore}B end %%EndProcSet %%BeginProcSet: /u/ddas/tex/pstricks/ps/pstricks.pro % PostScript prologue for pstricks.tex. % Created 1993/3/12. Source file was pstricks.doc % Version 0.93a, 93/03/12. % For use with Rokicki's dvips. /tx@Dict 200 dict def tx@Dict begin /ADict 25 dict def /CM { matrix currentmatrix } bind def /SLW /setlinewidth load def /CLW /currentlinewidth load def /CP /currentpoint load def /ED { exch def } bind def /L /lineto load def /T /translate load def /Atan { /atan load stopped { pop pop 0 } if } def /Div { dup 0 eq { pop } { div } ifelse } def /NET { neg exch neg exch T } def /Pyth { dup mul exch dup mul add sqrt } def /PtoC { 2 copy cos mul 3 1 roll sin mul } def /PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def /PathLength { flattenpath /z 0 def { /y1 ED /x1 ED /y2 y1 def /x2 x1 def } { /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } pathforall z } def /STP { .996264 dup scale } def /STV { SDict begin normalscale end STP } def /DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul /y ED x mul /x ED x 0 eq y 0 eq and { /x 1 def /y 1 def } if [ y x ] 1 a sub y mul setdash stroke } def /DotLine { /b PathLength def /a ED /z ED /y CLW def /z y z add def a 0 gt { /b b a div def } { a 0 eq { /b b y sub def } { a -3 eq { /b b y add def } if } ifelse } ifelse [ 0 b b z Div round Div dup 0 le { pop 1 } if ] a 0 gt { 0 } { y 2 div a -2 gt { neg } if } ifelse setdash 1 setlinecap stroke } def /LineFill { abs CLW add /a ED gsave clip pathbbox a Div ceiling /y2 ED /x2 ED a Div floor /y1 ED /x1 ED /n y2 y1 sub 1 add cvi def /y1 a y1 mul def newpath 2 setlinecap n { currentstrokeadjust == x1 y1 moveto x2 y1 L stroke /y1 y1 a add def } repeat grestore } def /LineFill { abs CLW add /a ED gsave clip pathbbox a Div ceiling /y2 ED /x2 ED a Div floor /y1 ED /x1 ED /n y2 y1 sub 1 add cvi def /y1 a y1 mul def newpath 2 setlinecap systemdict /currentstrokeadjust known { currentstrokeadjust } { false } ifelse { /t { } def } { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add exch itransform } bind def } ifelse n { x1 y1 t moveto x2 y1 t L stroke /y1 y1 a add def } repeat grestore } def /BeginArrow { ADict begin /@mtrx CM def gsave 2 copy T 2 index sub neg exch 3 index sub exch Atan rotate newpath } def /EndArrow { @mtrx setmatrix CP grestore end } def /Arrow { CLW mul add dup 2 div /w ED mul dup /h ED mul /a ED { 0 h T 1 -1 scale } if w neg h moveto 0 0 L w h L w neg a neg rlineto gsave fill grestore } def /Tbar { CLW mul add /z ED z -2 div CLW 2 div moveto z 0 rlineto stroke 0 CLW moveto } def /Bracket { CLW mul add dup CLW sub 2 div /x ED mul CLW add /y ED /z CLW 2 div def x neg y moveto x neg CLW 2 div L x CLW 2 div L x y L stroke 0 CLW moveto } def /RoundBracket { CLW mul add dup 2 div /x ED mul /y ED /mtrx CM def 0 CLW 2 div T x y mul 0 ne { x y scale } if 1 1 moveto .85 .5 .35 0 0 0 curveto -.35 0 -.85 .5 -1 1 curveto mtrx setmatrix stroke 0 CLW moveto } def /Shadow { [ { /moveto load } { /lineto load } { /curveto load } { /closepath load } pathforall ] cvx newpath 3 1 roll T exec } def /SD { 0 360 arc fill } def /SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def /ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def /SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } def /NArray { aload length 2 div dup dup cvi eq not { exch pop } if /n exch cvi def } def /NArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop } if f { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def /Line { NArray n 0 eq not { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def n { Lineto } repeat CP 4 2 roll ArrowB L pop pop } if } def /Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } ifelse { pop } repeat a } def /CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq and { pop pop /n n 1 sub def } if } def /Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto Lineto pop pop closepath } ifelse } def /CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth def } def /CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth def } def /CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def /y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul m mul neg def } def /IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } def /BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def /NC { CC x1 y1 x2 y2 x y curveto } def /EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def /BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def /NAC { x2 y2 x y curveto CC x1 y1 } def /EAC { x2 y2 x y ArrowB curveto pop pop } def /OpenCurve { NArray n 3 lt { n { pop pop } repeat } { BOC /n n 3 sub def n { NC } repeat EOC } ifelse } def /AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload /Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def /ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } repeat closepath pop pop } ifelse } def /EndDot { { /z DS def } { /z 0 def } ifelse /b ED 0 z DS SD b { 0 z DS CLW sub SD } if 0 DS z add CLW 4 div sub moveto } def /Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto x1 y1 lineto closepath } def /OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse /b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } ifelse } def /Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add /y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { pop pop Rect } { OvalFrame } ifelse } def /Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 y0 x0 2 mul x1 sub y1 ] def } def /Grid { /a 4 string def /b ED /d ED /n ED cvi dup 1 lt { pop 1 } if /c ED c div dup 0 eq { pop 1 } if /cy ED c div dup 0 eq { pop 1 } if /cx ED cy div cvi /y ED cx div cvi /x ED cy div cvi /y2 ED cx div cvi /x2 ED cy div cvi /y1 ED cx div cvi /x1 ED /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def b 0 gt { /z1 b 4 div CLW 2 div add def /Helvetica findfont b scalefont setfont /b b .95 mul CLW 2 div add def } if gsave n 0 gt { 1 setlinecap [ 0 cy n div ] 0 setdash } { 2 setlinecap } ifelse /c x1 def /i 500 w mul x1 add def /e y cy mul def /f y1 cy mul def /g y2 cy mul def x1 cx mul 0 T { newpath 0 e moveto b 0 gt { gsave d c a cvs dup stringwidth pop /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse h 0 gt {b neg} {z1} ifelse rmoveto show grestore } if 0 f moveto 0 g L stroke cx w mul 0 T c x2 eq c i eq or {exit} if /c c w add def } loop grestore gsave n 0 gt { 1 setlinecap [ 0 cx n div ] 0 setdash } { 2 setlinecap } ifelse /c y1 def /i 500 h mul y1 add def /e x cx mul def /f x1 cx mul def /g x2 cx mul def 0 y1 cy mul T { newpath e 0 moveto b 0 gt { gsave d c a cvs dup stringwidth pop /z2 ED w 0 gt {z1 z2 add neg} {z1} ifelse h 0 gt {z1} {b neg} ifelse rmoveto show grestore } if f 0 moveto g 0 L stroke 0 cy h mul T c y2 eq c i eq or {exit} if /c c h add def } loop grestore } def /ArcArrow { /d ED /b ED /a ED gsave newpath 0 -1000 moveto clip newpath 0 1 0 0 b grestore c mul /e ED pop pop pop r a e d PtoC y add exch x add exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c mul neg d } def /Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def /Rot { CP CP translate 3 -1 roll neg rotate NET } def /PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def /PutBegin { /lmtrx [ tx@Dict /lmtrx known { lmtrx aload pop } if CM ] def CP 4 2 roll T moveto } def /PutEnd { CP /lmtrx [ lmtrx aload pop setmatrix ] def moveto } def /Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { h1 abs h sub dup s mul abs } ifelse } def /UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q { x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add exch } def /BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { CP OLUnit T moveto /IfVisible true def } if } { IfVisible { CP OLUnit NET moveto /IfVisible false def } if } ifelse } def /InitOL { /OLUnit [ gsave CM STV 2890.79999 dup moveto setmatrix CP grestore ] cvx def /BOL { BeginOL } def /IfVisible true def } def end %%EndProcSet %%BeginProcSet: /u/ddas/tex/pstricks/ps/pst-node.pro % PostScript prologue for pst-node.tex. % Created 1993/3/12. Source file was pst-node.doc % Version 0.93a, 93/03/12. % For use with Rokicki's dvips. /tx@NodeDict 200 dict def tx@NodeDict begin /NewNode { gsave /next ED dict dup 3 -1 roll ED begin tx@Dict begin STV CP T exec end /NodeMtrx CM def next end grestore } def /InitPnode { /Y ED /X ED /NodePos { Nodesep Cos mul Nodesep Sin mul } def } def /InitCnode { /r ED /Y ED /X ED /NodePos { Nodesep r add dup Cos mul exch Sin mul } def } def /GetRnodePos { Cos 0 gt { /dx r Nodesep add def } { /dx l Nodesep sub def } ifelse Sin 0 gt { /dy u Nodesep add def } { /dy d Nodesep sub def } ifelse dx Sin mul abs dy Cos mul abs gt { dy Cos mul Sin div dy } { dx dup Sin mul Cos Div } ifelse } def /InitRnode { /r ED r mul neg /l ED /r r l add def /X l neg def { neg /d ED /u ED /Y 0 def } { neg /Y ED Y sub /u ED u mul neg /d ED /u u d add def /Y Y d sub def } ifelse /NodePos { GetRnodePos } def } def /InitRNode { /Y ED /X ED /r ED /X r 2 div X add def /r r X sub def /l X neg def Y add neg /d ED Y sub /u ED /NodePos { GetRnodePos } def } def /GetOnodePos { /ww w Nodesep add def /hh h Nodesep add def Sin ww mul Cos hh mul Atan dup cos ww mul exch sin hh mul } def /GetCenter { begin X Y NodeMtrx transform CM itransform end } def /GetAngle { nodeA GetCenter nodeB GetCenter 3 -1 roll sub 3 1 roll sub neg Atan } def /GetEdge { begin /Nodesep ED dup 1 0 NodeMtrx dtransform CM idtransform exch atan sub dup sin /Sin ED cos /Cos ED NodePos Y add exch X add exch NodeMtrx transform CM itransform end 4 2 roll 1 index 0 eq { pop pop } { 2 copy 5 2 roll cos mul add 4 1 roll sin mul sub exch } ifelse } def /GetPos { OffsetA AngleA NodesepA nodeA GetEdge /y1 ED /x1 ED OffsetB AngleB NodesepB nodeB GetEdge /y2 ED /x2 ED } def /InitNC { /nodeB ED /nodeA ED /NodesepB ED /NodesepA ED /OffsetB ED /OffsetA ED tx@NodeDict nodeA known tx@NodeDict nodeB known and dup { /nodeA nodeA load def /nodeB nodeB load def } if } def /LineMP { 4 copy 1 t sub mul exch t mul add 3 1 roll 1 t sub mul exch t mul add exch 6 2 roll sub 3 1 roll sub Atan } def /NCCoor { GetAngle /AngleA ED /AngleB AngleA 180 add def GetPos /LPutVar [ x2 x1 y2 y1 ] cvx def /LPutPos { LPutVar LineMP } def x1 y1 x2 y2 } def /NCLine { NCCoor tx@Dict begin ArrowB 4 2 roll ArrowA lineto end } def /BezierMidpoint { /y3 ED /x3 ED /y2 ED /x2 ED /y1 ED /x1 ED /y0 ED /x0 ED /t ED /cx x1 x0 sub 3 mul def /cy y1 y0 sub 3 mul def /bx x2 x1 sub 3 mul cx sub def /by y2 y1 sub 3 mul cy sub def /ax x3 x0 sub cx sub bx sub def /ay y3 y0 sub cy sub by sub def ax t 3 exp mul bx t t mul mul add cx t mul add x0 add ay t 3 exp mul by t t mul mul add cy t mul add y0 add 3 ay t t mul mul mul 2 by t mul mul add cy add 3 ax t t mul mul mul 2 bx t mul mul add cx add atan } def /GetArms { /x1a armA AngleA cos mul x1 add def /y1a armA AngleA sin mul y1 add def /x2a armB AngleB cos mul x2 add def /y2a armB AngleB sin mul y2 add def } def /NCCurve { GetPos x1 x2 sub y1 y2 sub Pyth 2 div dup 3 -1 roll mul /armA ED mul /armB ED GetArms x1a y1a x1 y1 tx@Dict begin ArrowA end x2a y2a x2 y2 tx@Dict begin ArrowB end curveto /LPutVar [ x1 y1 x1a y1a x2a y2a x2 y2 ] cvx def /LPutPos { t LPutVar BezierMidpoint } def } def /AnglesMP { LPutVar t 3 gt { /t t 3 sub def } { t 2 gt { /t t 2 sub def 10 -2 roll } { t 1 gt { /t t 1 sub def 10 -4 roll } { 10 4 roll } ifelse } ifelse } ifelse 6 { pop } repeat 3 -1 roll exch LineMP } def /NCAngles { GetPos GetArms /mtrx AngleA matrix rotate def x1a y1a mtrx transform pop x2a y2a mtrx transform exch pop mtrx itransform /y0 ED /x0 ED mark armB 0 ne { x2 y2 } if x2a y2a x0 y0 x1a y1a armA 0 ne { x1 y1 } if tx@Dict begin false Line end /LPutVar [ x2 y2 x2a y2a x0 y0 x1a y1a x1 y1 ] cvx def /LPutPos { AnglesMP } def } def /NCAngle { GetPos /x2a armB AngleB cos mul x2 add def /y2a armB AngleB sin mul y2 add def /mtrx AngleA matrix rotate def x2a y2a mtrx transform pop x1 y1 mtrx transform exch pop mtrx itransform /y0 ED /x0 ED mark armB 0 ne { x2 y2 } if x2a y2a x0 y0 x1 y1 tx@Dict begin false Line end /LPutVar [ x2 y2 x2 y2 x2a y2a x0 y0 x1 y1 ] cvx def /LPutPos { AnglesMP } def } def /NCBar { GetPos GetArms /mtrx AngleA matrix rotate def x1a y1a mtrx transform pop x2a y2a mtrx transform pop sub dup 0 mtrx itransform 3 -1 roll 0 gt { /y2a exch y2a add def /x2a exch x2a add def } { /y1a exch neg y1a add def /x2a exch neg x2a add def } ifelse mark x2 y2 x2a y2a x1a y1a x1 y1 tx@Dict begin false Line end /LPutVar [ x2 y2 x2 y2 x2a y2a x1a y1a x1 y1 ] cvx def /LPutPos { LPutVar AnglesMP } def } def /NCDiag { GetPos GetArms mark x2 y2 x2a y2a x1a y1a x1 y1 tx@Dict begin false Line end /LPutVar [ x2 y2 x2 y2 x2a y2a x1a y1a x1 y1 ] cvx def /LPutPos { AnglesMP } def } def /NCDiagg { OffsetA AngleA NodesepA nodeA GetEdge /y1 ED /x1 ED /x1a armA AngleA cos mul x1 add def /y1a armA AngleA sin mul y1 add def nodeB GetCenter y1a sub exch x1a sub Atan 180 add /AngleB ED OffsetB AngleB NodesepB nodeB GetEdge /y2 ED /x2 ED mark x2 y2 x1a y1a x1 y1 tx@Dict begin false Line end /LPutVar [ x2 y2 x2 y2 x2 y2 x1a y1a x1 y1] cvx def /LPutPos { AnglesMP } def } def /LoopMP { /t t abs def [ LPutVar ] length 2 div 1 sub dup t lt { /t ED } { pop } ifelse mark LPutVar t cvi { /t t 1 sub def pop pop } repeat counttomark 1 add 4 roll cleartomark 3 -1 roll exch LineMP } def /NCLoop { GetPos GetArms /mtrx AngleA matrix rotate def x1a y1a mtrx transform loopsize add /y1b ED /x1b ED /x2b x2a y2a mtrx transform pop def x2b y1b mtrx itransform /y2b ED /x2b ED x1b y1b mtrx itransform /y1b ED /x1b ED mark armB 0 ne { x2 y2 } if x2a y2a x2b y2b x1b y1b x1a y1a armA 0 ne { x1 y1 } if tx@Dict begin false Line end /LPutVar [ x2 y2 x2a y2a x2b y2b x1b y1b x1a y1a x1 y1 ] cvx def /LPutPos { LoopMP } def } def /NCCircle { nodeA GetCenter 0 0 NodesepA nodeA GetEdge pop 3 1 roll /Y ED /X ED X sub 2 div dup 2 exp r r mul sub abs sqrt atan 2 mul /a ED r AngleA 90 add PtoC Y add exch X add exch 2 copy /LPutVar [ 4 2 roll r a ] def /LPutPos { LPutVar aload pop t 360 mul add dup 5 1 roll 90 sub PtoC 3 -1 roll add 3 1 roll add exch 3 -1 roll } def r AngleA 90 sub a add AngleA 270 add a sub tx@Dict begin /angleB ED /angleA ED /r ED /c 57.2957 r Div def /y ED /x ED } def /LPutCoor { tx@NodeDict /LPutPos known { gsave LPutPos tx@Dict begin /langle ED CM 3 1 roll STV CP 3 -1 roll sub neg 3 1 roll sub exch moveto setmatrix CP end grestore } { 0 0 tx@Dict /langle 0 def end } ifelse } def end %%EndProcSet %%BeginProcSet: texps.pro TeXDict begin /rf{findfont dup length 1 add dict begin{1 index /FID ne 2 index /UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics exch def dict begin Encoding{exch dup type /integertype ne{pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} ifelse}forall Metrics /Metrics currentdict end def[2 index currentdict end definefont 3 -1 roll makefont /setfont load]cvx def}def /ObliqueSlant{dup sin S cos div neg}B /SlantFont{4 index mul add}def /ExtendFont{3 -1 roll mul exch}def /ReEncodeFont{/Encoding exch def}def end %%EndProcSet %%BeginProcSet: special.pro TeXDict begin /SDict 200 dict N SDict begin /@SpecialDefaults{/hs 612 N /vs 792 N /ho 0 N /vo 0 N /hsc 1 N /vsc 1 N /ang 0 N /CLIP 0 N /rwiSeen false N /rhiSeen false N /letter{}N /note{}N /a4{}N /legal{}N}B /@scaleunit 100 N /@hscale{@scaleunit div /hsc X}B /@vscale{@scaleunit div /vsc X}B /@hsize{/hs X /CLIP 1 N}B /@vsize{/vs X /CLIP 1 N}B /@clip{ /CLIP 2 N}B /@hoffset{/ho X}B /@voffset{/vo X}B /@angle{/ang X}B /@rwi{ 10 div /rwi X /rwiSeen true N}B /@rhi{10 div /rhi X /rhiSeen true N}B /@llx{/llx X}B /@lly{/lly X}B /@urx{/urx X}B /@ury{/ury X}B /magscale true def end /@MacSetUp{userdict /md known{userdict /md get type /dicttype eq{userdict begin md length 10 add md maxlength ge{/md md dup length 20 add dict copy def}if end md begin /letter{}N /note{}N /legal{} N /od{txpose 1 0 mtx defaultmatrix dtransform S atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{itransform lineto} }{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform{ itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}}{{ closepath}}pathforall newpath counttomark array astore /gc xdf pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if}N /txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 -1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop 90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr 1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr 2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S TR}if}N /cp {pop pop showpage pm restore}N end}if}if}N /normalscale{Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale}if 0 setgray} N /psfts{S 65781.76 div N}N /startTexFig{/psf$SavedState save N userdict maxlength dict begin /magscale false def normalscale currentpoint TR /psf$ury psfts /psf$urx psfts /psf$lly psfts /psf$llx psfts /psf$y psfts /psf$x psfts currentpoint /psf$cy X /psf$cx X /psf$sx psf$x psf$urx psf$llx sub div N /psf$sy psf$y psf$ury psf$lly sub div N psf$sx psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub TR /showpage{}N /erasepage{}N /copypage{}N /p 3 def @MacSetUp}N /doclip{ psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath moveto}N /endTexFig{end psf$SavedState restore}N /@beginspecial{SDict begin /SpecialSave save N gsave normalscale currentpoint TR @SpecialDefaults count /ocount X /dcount countdictstack N}N /@setspecial {CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR }{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury lineto closepath clip}if /showpage{}N /erasepage{}N /copypage{}N newpath }N /@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{ end}repeat grestore SpecialSave restore end}N /@defspecial{SDict begin} N /@fedspecial{end}B /li{lineto}B /rl{rlineto}B /rc{rcurveto}B /np{ /SaveX currentpoint /SaveY X N 1 setlinecap newpath}N /st{stroke SaveX SaveY moveto}N /fil{fill SaveX SaveY moveto}N /ellipse{/endangle X /startangle X /yrad X /xrad X /savematrix matrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc savematrix setmatrix}N end %%EndProcSet TeXDict begin @defspecial TeXDict begin /box{newpath 2 copy moveto 3 copy pop exch lineto 4 copy pop pop lineto 4 copy exch pop exch pop lineto closepath } bind def /min{ 2 copy gt { exch } if pop } bind def/max{ 2 copy lt { exch } if pop } bind def/roundedbox{/radius exch store 3 2 roll 2 copy min radius sub /miny exch store max radius add /maxy exch store 2 copy min radius sub /minx exch store max radius add /maxx exch store newpath minx radius add miny moveto maxx miny maxx maxy radius arcto maxx maxy minx maxy radius arcto minx maxy minx miny radius arcto minx miny maxx miny radius arcto 16 {pop} repeat closepath }bind def /rectcartouche{box gsave .95 setgray fill grestore 1 setlinewidth stroke }bind def /cartouche{roundedbox gsave .95 setgray fill grestore 1 setlinewidth stroke }bind def end TeXDict begin /box{newpath 2 copy moveto 3 copy pop exch lineto 4 copy pop pop lineto 4 copy exch pop exch pop lineto closepath } bind def /min{ 2 copy gt { exch } if pop } bind def/max{ 2 copy lt { exch } if pop } bind def/roundedbox{/radius exch store 3 2 roll 2 copy min radius sub /miny exch store max radius add /maxy exch store 2 copy min radius sub /minx exch store max radius add /maxx exch store newpath minx radius add miny moveto maxx miny maxx maxy radius arcto maxx maxy minx maxy radius arcto minx maxy minx miny radius arcto minx miny maxx miny radius arcto 16 {pop} repeat closepath }bind def /rectcartouche{box gsave .95 setgray fill grestore 1 setlinewidth stroke }bind def /cartouche{roundedbox gsave .95 setgray fill grestore 1 setlinewidth stroke }bind def end @fedspecial end TeXDict begin 40258431 52099146 1000 300 300 (/v/ahhnold/v3/ddas/research/papers/TR94-16/paper.dvi) @start /Fa 139[22 6[22 3[22 3[22 101[{}4 37.500000 /Courier rf /Fb 188[22 67[{}1 33.333332 /Times-Italic rf /Fc 135[27 3[27 27 3[27 27 27 27 2[27 2[27 27 1[27 27 27 97[{}13 45.624989 /Courier rf /Fd 3 49 df<020002000200C218F2783AE00F800F803AE0F2 78C2180200020002000D0E7E8E12>3 D<0000600000003000000030000000180000000C 00FFFFFE00FFFFFF00000001C0000000F00000003C00000070000001C000000380FFFFFE 00FFFFFC0000000C00000018000000300000003000000060001E147E9123>41 D<060F0F0E1E1E1C3C383830707060E0C04008117F910A>48 D E /Fe 4 104 df<0300030003000300E31C73381FE0078007801FE07338E31C0300030003 0003000E107E9013>3 D<000018000000000C000000000C000000000600000000070000 0000030000FFFFFFC000FFFFFFE00000000038000000001E0000000007800000000E0000 000038000000007000FFFFFFC000FFFFFF80000000030000000006000000000600000000 0C000000000C0000000018000021167E9326>41 D<003C00E001C0038003800380038003 800380038003800380038003800380038007001E00F8001E000700038003800380038003 800380038003800380038003800380038001C000E0003C0E257E9B13>102 DI E /Ff 7 56 df<06003E00CE000E000E000E000E000E000E000E 000E000E000E000E000E007FE00B107E8F11>49 D<3F8079C0F8E0F8707070007000E000 E001C0038006000C3018303FE07FE0FFE00C107E8F11>I<0FC038707878783878783870 00E00FC000702038703CF83CF83CF03870701FC00E107F8F11>I<00E001E003E002E006 E00CE018E030E060E0C0E0FFFC00E000E000E000E007FC0E107F8F11>I<60607FC07F80 7F00600060007F8061C040E000F060F0F0F0F0F0F0E061C03F000C107E8F11>I<07E01C 30303870786078E030E7C0E830F018E01CE01CE01C601C301818300FC00E107F8F11>I< 60007FFC7FF87FF0C060C0C001800300070006000E000E001E001E001E001E000C000E11 7E9011>I E /Fg 1 69 df68 D E /Fh 1 111 df<71F09A189C18981818183030 303030323062606460380F0B7E8A13>110 D E /Fi 10 112 df<60F0F0F0F0F0F06060 6060606060606060200000000060F0F060041A7D990B>33 D<00800100020004000C0008 0018003000300030006000600060006000E000E000E000E000E000E000E000E000E000E0 006000600060006000300030003000180008000C00040002000100008009267D9B0F>40 D<8000400020001000180008000C00060006000600030003000300030003800380038003 8003800380038003800380038003000300030003000600060006000C0008001800100020 004000800009267E9B0F>I<000C0000000C0000000C0000000C0000000C0000000C0000 000C0000000C0000000C0000000C0000000C0000000C0000FFFFFF80FFFFFF80000C0000 000C0000000C0000000C0000000C0000000C0000000C0000000C0000000C0000000C0000 000C0000000C0000191A7E951E>43 D<60F0F060000000000000000060F0F06004107D8F 0B>58 D<60F0F060000000000000000060F0F0701010102020404004177D8F0B>I61 D<0FCF001871803030007038007038007038007038003030001860 002FC0006000006000007000003FF0003FFC001FFE00600F00C00300C00300C00300C003 00600600381C0007E00011187F8F13>103 D108 D<07E01C38300C700E6006E007E007E007E007E007E0076006700E381C 1C3807E010107F8F13>111 D E /Fj 15 64 df<07800018001840001800302000300030 1800E00060170360006008FCC000E008018000E008018000E008030000E008060000E008 060000E0080C0000600818000060101800003010300000302060000018406000000780C0 000000018078000001818400000303020000030301000006070100000C060100000C0E00 8000180E008000300E008000300E008000600E008000C00E008000C00E00800180060100 0300070100030003010006000302000C00018400040000780021257EA126>37 D<0040008001000300060004000C001800180038003000300070006000600060006000E0 00E000E000E000E000E000E000E000E000E000E000E00060006000600060007000300030 003800180018000C000400060003000100008000400A2E7BA112>40 D<8000400020003000180008000C00060006000700030003000380018001800180018001 C001C001C001C001C001C001C001C001C001C001C001C001800180018001800380030003 000700060006000C000800180030002000400080000A2E7EA112>I<0003000000030000 000300000003000000030000000300000003000000030000000300000003000000030000 00030000000300000003000000030000FFFFFFFCFFFFFFFC000300000003000000030000 000300000003000000030000000300000003000000030000000300000003000000030000 0003000000030000000300001E207E9A23>43 D<03F0000E1C001C0E0018060038070070 0380700380700380700380F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F0 03C0F003C0F003C0F003C0F003C07003807003807003807807803807001806001C0E000E 1C0003F000121F7E9D17>48 D<008003800F80F380038003800380038003800380038003 80038003800380038003800380038003800380038003800380038003800380038007C0FF FE0F1E7C9D17>I<03F0000C1C00100E00200700400780800780F007C0F803C0F803C0F8 03C02007C00007C0000780000780000F00000E00001C0000380000700000600000C00001 80000300000600400C00401800401000803FFF807FFF80FFFF80121E7E9D17>I<03F000 0C1C00100E00200F00780F80780780780780380F80000F80000F00000F00001E00001C00 00700007F000003C00000E00000F000007800007800007C02007C0F807C0F807C0F807C0 F00780400780400F00200E00183C0007F000121F7E9D17>I<000600000600000E00000E 00001E00002E00002E00004E00008E00008E00010E00020E00020E00040E00080E00080E 00100E00200E00200E00400E00C00E00FFFFF0000E00000E00000E00000E00000E00000E 00000E0000FFE0141E7F9D17>I<1803001FFE001FFC001FF8001FE00010000010000010 000010000010000010000011F000161C00180E001007001007800003800003800003C000 03C00003C07003C0F003C0F003C0E00380400380400700200600100C0008380007E00012 1F7E9D17>I<007C000182000701000E03800C0780180780380300380000780000700000 700000F1F000F21C00F40600F80700F80380F80380F003C0F003C0F003C0F003C0F003C0 7003C07003C07003803803803807001807000C0E00061C0001F000121F7E9D17>I<70F8 F8F8700000000000000000000070F8F8F87005147C930D>58 D<70F8F8F8700000000000 000000000070F0F8F878080808101010202040051D7C930D>I<7FFFFFF8FFFFFFFC0000 000000000000000000000000000000000000000000000000000000000000FFFFFFFC7FFF FFF81E0C7E9023>61 D<0FE0103C601E400EE00FF00FF00F600F001E001C003800700060 00C00080008001000100010001000100010000000000000000000000038007C007C007C0 038010207E9F15>63 D E /Fk 8 108 df<01800780FF80FF8007800780078007800780 0780078007800780078007800780078007800780FFF8FFF80D157D9414>49 D<0FC03FF870FCF83CF83EF81E701E003E003C0038007000E001C0038006060C06180E3F FC7FFCFFFCFFFC0F157E9414>I<0FC01FF03078787C783C783C107C007800E00FE00078 003C003C003E703EF83EF83EF83C70783FF00FC00F157E9414>I<000C00001C00003C00 007C0000FC0001BC00033C00063C000C3C00183C00303C00603C00C03C00FFFF80FFFF80 003C00003C00003C00003C0003FF8003FF8011157F9414>I<700C7FF87FF07FE07F8060 006000600067E07870603C003C003E003E703EF03EF03EE03C70783FF00FC00F157E9414 >I<03F00FF81E1C383C383C70187000F000F3E0F438F81CF01CF01EF01EF01E701E701E 781C3C381FF007E00F157E9414>I<387C7C7C3800000000FCFC3C3C3C3C3C3C3C3C3C3C 3CFFFF08187F970B>105 D107 D E /Fl 3 80 df68 D73 D<001FF80000FFFF0001F81F8007E007E00FC003F01F8001F81F0000F83F00 00FC7F0000FE7E00007E7E00007EFE00007FFE00007FFE00007FFE00007FFE00007FFE00 007FFE00007FFE00007FFE00007F7E00007E7F0000FE7F0000FE3F0000FC3F8001FC1F80 01F80FC003F007E007E001F81F8000FFFF00001FF800201F7D9E27>79 D E /Fm 1 4 df3 D E /Fn 167[26 7[20 2[32 22 6[22 3[26 65[{}6 36.499977 /Times-Roman rf /Fo 139[9 13 11 1[17 17 17 1[9 2[9 1[17 1[15 17 15 1[15 12[20 18 22 2[24 24 30 20 1[13 11 2[18 20 1[22 1[24 20[8 2[11 11 40[{}29 33.333332 /Times-Roman rf /Fp 8 121 df<60F0F06004047D830B>58 D<60F0F07010101020204040040B7D830B >I<000010000000300000007000000070000000F8000000B80000013800000238000002 380000043800000C38000008380000103C0000101C0000201C0000401C00007FFC000080 1C0000801C0001001C0002001C0002000E0004000E000C000E001C000E00FF00FFC01A1A 7F991D>65 D<03FFFFC0007001C0007000C00070004000E0004000E0004000E0004000E0 004001C0200001C0200001C0200001C0600003FFC0000380C00003804000038040000700 80000700010007000100070002000E0002000E0006000E0004000E000C001C003800FFFF F8001A1A7E991C>69 D<03FFFFC0007001C0007000C00070004000E0004000E0004000E0 004000E0004001C0200001C0200001C0200001C0600003FFC0000380C000038040000380 4000070080000700000007000000070000000E0000000E0000000E0000000E0000001E00 0000FFE000001A1A7E9919>I<000FE0000038380000E00E0001C00700070007000F0003 800E0003801C0003803C0003C0380003C0780003C0780003C0F0000780F0000780F00007 80F0000F00F0000F00F0000E00F0001E00F0003C0070003800700070003800E0001C03C0 000E0F000003F800001A1A7E991D>79 D<001F080060D800803801003803001006001006 001006001006000007000007C00003FC0001FF00007F80000FC00001C00001C00000C020 00C02000C0600180600180600300700600CC1C0083F000151A7E9917>83 D<07878008C8C010F1C020E0C020E00020E00001C00001C00001C00001C0000381000381 00C38100E58200C5840078780012107F8F16>120 D E /Fq 134[19 19 2[21 12 15 17 1[21 19 21 31 10 2[10 21 19 1[17 21 17 1[19 10[27 3[27 29 23 29 5[15 3[25 27 2[27 1[19 63[{}28 37.500000 /Times-Bold rf /Fr 134[17 3[19 10 15 15 19 19 1[19 27 3[10 19 19 10 17 3[19 97[{}15 37.500000 /Times-Italic rf /Fs 10 58 df<1F00318060C04040C060C060C060C060C060C060C060C060404060C0 31801F000B107F8F0F>48 D<187898181818181818181818181818FF08107D8F0F>I<1F 00618040C08060C0600060006000C00180030006000C00102020207FC0FFC00B107F8F0F >I<1F00218060C060C000C0008001001F00008000400060C060C060804060801F000B10 7F8F0F>I<01800180038005800D801980118021804180C180FFE001800180018001800F E00B107F8F0F>I<20C03F802E002000200020002F0030802040006000600060C06080C0 61801F000B107F8F0F>I<0780184030C060C06000C000CF00F080E040C060C060C06040 6060C030801F000B107F8F0F>I<40007FF07FE080408040008001000200020006000400 04000C000C000C000C000C000C117F900F>I<1F00318060C060C060C031803F000E0033 8061C0C060C060C060C04060C01F000B107F8F0F>I<1F00318060C0C040C060C060C060 40E021E01E600060004060C0608063001E000B107F8F0F>I E /Ft 11 62 df<07C018303018701C600C600CE00EE00EE00EE00EE00EE00EE00EE00EE00E60 0C600C701C30181C7007C00F157F9412>48 D<06000E00FE000E000E000E000E000E000E 000E000E000E000E000E000E000E000E000E000E000E00FFE00B157D9412>I<0F8030E0 40708030C038E0384038003800700070006000C00180030006000C08080810183FF07FF0 FFF00D157E9412>I<0FE030306018701C701C001C00180038006007E000300018000C00 0E000EE00EE00EC00C401830300FE00F157F9412>I<00300030007000F001F001700270 047008701870107020704070C070FFFE0070007000700070007003FE0F157F9412>I<60 307FE07FC0440040004000400040004F8070E040700030003800384038E038E038803040 6020C01F000D157E9412>I<01F00608080C181C301C70006000E000E3E0EC30F018F00C E00EE00EE00E600E600E300C3018183007C00F157F9412>I<40007FFE7FFC7FF8C00880 1080200040008000800100030003000200060006000E000E000E000E000E0004000F167E 9512>I<07E018302018600C600C700C78183E101F6007C00FF018F8607C601EC00EC006 C006C004600C38300FE00F157F9412>I<07C0183030186018E00CE00CE00EE00EE00E60 1E301E186E0F8E000E000C001C70187018603020E01F800F157F9412>I61 D E /Fu 6 106 df0 D<70F8F8F87005057C8D0D>I< 03F0000FFC001FFE003FFF007FFF807FFF80FFFFC0FFFFC0FFFFC0FFFFC0FFFFC0FFFFC0 7FFF807FFF803FFF001FFE000FFC0003F00012127E9317>15 D<000000C000000000C000 00000060000000006000000000300000000018000000000C007FFFFFFE00FFFFFFFF0000 000001C000000000E0000000003C000000000F000000003C000000007000000001C00000 000380FFFFFFFE007FFFFFFC000000001800000000180000000030000000006000000000 6000000000C000000000C000281A7E972D>41 D<0020006000C000C000C0018001800300 03000300060006000C000C0018001800180030003000600060006000C000C00060006000 6000300030001800180018000C000C00060006000300030003000180018000C000C000C0 006000200B2E7CA112>104 DI E /Fv 9 111 df<60F0F06004047D830A>58 D<00080018003000300030006000 60006000C000C000C0018001800180030003000600060006000C000C000C001800180018 00300030003000600060006000C000C0000D217E9812>61 D<07FFF00000E01C0000E006 0000E0070000E0070001C0070001C0070001C0070001C00E0003801C000380700003FF80 000380E000070070000700380007003800070038000E0070000E0070000E0070800E0070 801C003100FF801E0019177F961B>82 D<071018F0307060706060C060C060C06080C080 C480C4C1C446C838700E0E7E8D13>97 D<7C001800180018001800300030003000300067 8068C070406060C060C060C060C06080C080C08180C10046003C000B177E960F>I<07C0 0C20107020706000C000C000C00080008000C010C02060C03F000C0E7E8D0F>I<030003 8003000000000000000000000000001C002400460046008C000C00180018001800310031 00320032001C0009177F960C>105 D<00180038001000000000000000000000000001C0 022004300430086000600060006000C000C000C000C001800180018001806300E300C600 78000D1D80960E>I<383C0044C6004702004602008E06000C06000C06000C0600180C00 180C40181840181880300980300E00120E7F8D15>110 D E /Fw 19 121 df<70F8F8F87005057C840D>58 D<70F0F8F878080808101010202040050E7C84 0D>I<0000400000C0000180000180000180000300000300000300000600000600000C00 000C00000C0000180000180000180000300000300000600000600000600000C00000C000 00C0000180000180000180000300000300000600000600000600000C00000C00000C0000 180000180000300000300000300000600000600000600000C00000C00000122D7EA117> 61 DI<000002000000060000000E0000000E0000001E0000001F0000002F000000 6F0000004F0000008F0000008F0000010F0000030F0000020F0000040F8000040F800008 078000180780001007800020078000200780007FFF800080078000800780010007C00100 03C0020003C0040003C0040003C00C0003C03C0007C0FF003FFC1E207E9F22>65 D<01FFFFFF80001E000F00001E000300001E000300001E000100003C000100003C000100 003C000100003C000100007802020000780200000078020000007806000000F00C000000 FFFC000000F00C000000F00C000001E008000001E008000001E008000001E000040003C0 00080003C000080003C000100003C0001000078000200007800060000780004000078001 C0000F0007C000FFFFFF8000211F7E9E22>69 D<01FFFFFF001E001E001E0006001E0006 001E0002003C0002003C0002003C0002003C000200780004007802000078020000780200 00F0040000F00C0000FFFC0000F00C0001E0080001E0080001E0080001E0080003C00000 03C0000003C0000003C00000078000000780000007800000078000000F800000FFFC0000 201F7E9E1D>I<01FFF0001F00001E00001E00001E00003C00003C00003C00003C000078 0000780000780000780000F00000F00000F00000F00001E00001E00001E00001E00003C0 0003C00003C00003C0000780000780000780000780000F8000FFF000141F7E9E14>73 D<01FE00000FF8001E00001F80001700001F00001700002F00001700004F00002700005E 00002700009E00002700011E00002700011E00004380023C00004380023C00004380043C 00004380083C000083800878000083801078000083802078000081C02078000101C040F0 000101C080F0000101C080F0000101C100F0000201C101E0000201C201E0000201C401E0 000200E401E0000400E803C0000400F003C0000400F003C0000C00E003C0001E00C007C0 00FFC0C07FFC002D1F7E9E2C>77 D<01FF001FF8001F0003C0001F800100001780010000 178001000023C002000023C002000021E002000021E002000041F004000040F004000040 F004000040780400008078080000807C080000803C080000803C080001001E100001001E 100001000F100001000F100002000FA000020007A000020007A000020003E000040003C0 00040003C000040001C0000C0001C0001E00008000FFC0008000251F7E9E25>I<0000FF 00000781C0001C00E0003800700070003801C0001C03C0001C0380001E0700000E0F0000 0E1E00000E1E00000E3C00000E3C00000E7800001E7800001E7800001E7800001EF00000 3CF000003CF0000038F0000078F0000070700000F0700001E0780001C078000380380007 001C000E001C001C000F0070000381C00000FF00001F217F9F23>I<01FFFF80001E00F0 001E0038001E001C001E001C003C001E003C001E003C001E003C001E0078003C0078003C 00780078007800F000F001C000F0070000FFF80000F00E0001E0070001E0078001E00380 01E003C003C0078003C0078003C0078003C0078007800F0007800F0207800F0207800F04 0F800704FFF80308000001F01F207E9E23>82 D<0003F040000C08C00030058000600380 00C0038001C00180018001000380010003800100038001000380000003C0000003E00000 03FC000001FFC00000FFF000007FF800001FF8000001FC0000007C0000003C0000001C00 00001C0020001C0020001C00200018006000380060003000600070007000E000E8018000 C603000081FC00001A217E9F1C>I<00F1800389C00707800E03801C03803C0380380700 780700780700780700F00E00F00E00F00E00F00E10F01C20F01C20703C20705C40308C40 0F078014147E9318>97 D<07803F8007000700070007000E000E000E000E001C001C001C F01D0C3A0E3C0E380F380F700F700F700F700FE01EE01EE01EE01CE03CE038607060E031 C01F0010207E9F14>I<007C0001C3000700800E07801E07801C07003C02007800007800 00780000F00000F00000F00000F00000F000007001007002003004001838000FC0001114 7E9314>I<00E001E001E000C000000000000000000000000000000E0013002380438043 8043808700070007000E000E001C001C001C20384038403840388019000E000B1F7E9E10 >105 D<0000C00001E00001E00001C00000000000000000000000000000000000000000 00001E00002300004380008380010380010380020700000700000700000700000E00000E 00000E00000E00001C00001C00001C00001C000038000038000038000038000070000070 0030700078E000F1C0006380003E00001328819E13>I<03C1C00C62201034701038F020 38F020386040700000700000700000700000E00000E00000E00000E02061C040F1C040F1 C080E2C080446300383C0014147E931A>120 D E /Fx 138[25 15 18 20 1[25 23 25 38 13 2[13 25 23 1[20 25 20 25 23 12[30 25 2[28 35 5[18 2[28 1[33 2[33 13[23 23 23 2[11 15 45[{}30 45.624989 /Times-Bold rf /Fy 133[22 25 25 1[25 28 17 19 22 28 28 25 28 41 14 2[14 28 25 17 22 28 22 1[25 10[36 1[33 1[36 1[30 39 36 4[19 4[36 36 33 12[25 25 25 25 25 2[12 46[{}38 50.000000 /Times-Bold rf /Fz 47[37 21[17 10[21 21 3[17 47[17 19 19 27 19 19 10 15 12 19 19 19 19 29 10 19 10 10 19 19 12 17 19 17 19 17 7[27 1[35 27 27 23 21 25 27 21 27 27 33 23 1[15 12 1[27 21 23 27 25 1[27 5[10 1[19 19 19 19 19 19 19 19 19 19 10 9 12 9 2[12 12 40[{}69 37.500000 /Times-Roman rf /FA 2 49 df<0C000C00CCC0EDC07F800C 007F80EDC0CCC00C000C000A0B7D8B10>3 D<081C1C3838383070706060C0C0060D7E8D 09>48 D E /FB 133[18 20 20 1[20 23 13 18 18 1[23 23 23 33 13 20 13 13 23 23 13 20 23 20 23 23 9[38 3[23 28 33 28 33 1[38 3[15 1[33 1[28 33 30 28 28 7[23 23 23 23 2[23 23 23 3[15 11 44[{}47 45.624989 /Times-Italic rf /FC 81[33 53[30 43 1[33 20 23 27 1[33 30 33 50 17 33 1[17 33 30 20 27 33 27 1[30 10[43 1[40 1[43 1[37 6[23 3[40 1[43 1[43 6[20 3[30 30 30 30 30 30 3[20 45[{}37 59.999973 /Times-Bold rf /FD 81[23 51[18 21 21 30 21 21 12 16 14 21 21 21 21 32 12 21 12 12 21 21 14 18 21 18 21 18 9[39 30 30 25 2[30 23 30 30 3[16 14 2[23 6[18 3[12 12 2[21 21 21 21 5[10 14 10 2[14 14 40[{}50 41.666668 /Times-Roman rf /FE 139[14 16 18 14[18 23 21 31[30 65[{}7 41.666668 /Times-Bold rf /FF 78[25 55[25 25 1[25 25 14 19 17 1[25 25 25 39 3[14 25 1[17 22 25 22 25 22 11[36 30 28 14[36 33 33 36 46 7[25 25 4[25 25 2[12 1[12 44[{}34 50.000000 /Times-Roman rf /FG 47[45 13[15 7[20 8[23 1[25 25 3[20 47[20 23 23 33 23 23 13 18 15 23 23 23 23 35 13 23 13 13 23 23 15 20 23 20 23 20 3[15 1[15 1[33 33 43 33 33 28 25 30 33 25 33 33 40 28 33 18 15 33 33 25 28 33 30 30 33 1[20 3[13 13 23 23 23 23 23 23 23 23 23 23 13 11 15 11 26 1[15 15 15 1[38 37[{}82 45.624989 /Times-Roman rf /FH 3 104 df<00C00000C00000C00000C00000C000E0C1C0F0C3C038C7000EDC0003 F00000C00003F0000EDC0038C700F0C3C0E0C1C000C00000C00000C00000C00000C00012 157D9619>3 D<0003C0001E0000380000700000E00000E00000E00000E00000E00000E0 0000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00001C0 000380000F0000F800000F000003800001C00000E00000E00000E00000E00000E00000E0 0000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E0000070 00003800001E000003C012317DA419>102 DI E /FI 81[40 51[32 36 1[52 1[40 24 28 32 1[40 36 40 60 20 40 1[20 2[24 32 1[32 1[36 13[40 52 56 44 56 8[44 4[52 6[24 58[{}27 72.000000 /Times-Bold rf end %%EndProlog %%BeginSetup %%Feature: *Resolution 300dpi TeXDict begin %%EndSetup %%Page: 1 1 1 0 bop 342 206 a FI(Prairie:)25 b(A)17 b(Rule)h(Speci\256cation)e (Framew)o(ork)643 306 y(f)n(or)i(Query)f(Optimizers)1308 280 y FH(\003)722 407 y FG(T)m(echnical)11 b(Report)g(TR)g(94\26116)580 539 y FF(Dinesh)i(Das)325 b(Don)12 b(Batory)631 603 y(Department)g(of)g (Computer)f(Sciences)638 667 y(The)i(Uni)o(v)o(ersity)f(of)g(T)m(e)o (xas)h(at)g(Austin)708 731 y(Austin,)g(T)m(e)o(xas)g(78712\2611188)679 795 y FH(f)p FF(ddas,batory)p FH(g)p FF(@cs.ute)o(xas.edu)898 996 y FE(Abstract)241 1066 y FD(From)i(our)g(e)o(xperience,)j(current)d (rule-based)h(query)e(optimizers)h(do)g(not)g(pro)o(vide)f(a)i(v)o(ery) f(intuiti)o(v)o(e)179 1121 y(and)e(well-de\256ned)f(frame)o(work)h(to)g (de\256ne)g(rules)g(and)g(actions.)23 b(T)m(o)13 b(remedy)h(this)e (situation,)g(we)i(propose)179 1176 y(an)i(e)o(xtensible)g(and)g (structured)f(algebraic)i(frame)o(work)e(called)i(Prairie)e(for)h (specifying)f(rules.)33 b(Prairie)179 1231 y(facilitates)10 b(rule-writing)f(by)i(enabling)f(a)i(user)g(to)e(write)h(rules)g(and)h (actions)f(more)g(quickly)m(,)g(correctly)g(and)179 1285 y(in)e(an)i(easy-to-understand)e(and)i(easy-to-deb)o(ug)e(manner)n(.) 241 1340 y(Query)14 b(optimizers)g(consist)g(of)g(three)h(major)f (parts:)23 b(a)15 b(search)h(space,)h(a)e(cost)f(model)h(and)f(a)h (search)179 1395 y(strate)o(gy)m(.)25 b(The)14 b(approach)g(we)g(take)f (is)h(only)e(to)h(de)o(v)o(elop)h(the)f(algebra)h(which)f(de\256nes)h (the)f(search)i(space)179 1450 y(and)d(the)g(cost)g(model;)g(we)g(do)g (not)f(propose)h(a)g(search)h(engine)f(\(i.e.,)h(search)h(strate)o (gy\))d(to)h(dri)o(v)o(e)f(the)h(rules.)179 1505 y(W)m(e)j(ha)o(v)o(e)h (chosen)f(the)f(V)-5 b(olcano)14 b(optimizer)g(generator)h(as)g(our)g (search)g(engine,)h(because)h(it)d(is)g(publicly)179 1559 y(a)o(v)o(ailable,)c(and)f(also)h(because)h(it)e(has)g(an)h(ef)o (\256cient)g(branch-and-bound)e(search)i(strate)o(gy)m(.)16 b(Using)8 b(Prairie)i(as)179 1614 y(a)g(front-end,)e(we)i(translate)f (Prairie)h(rules)f(to)g(V)-5 b(olcano)8 b(to)h(v)o(alidate)g(our)g (claim)h(that)e(Prairie)i(makes)g(it)e(easier)179 1669 y(to)h(write)h(rules.)241 1724 y(W)m(e)g(describe)h(our)e(algebra)h (and)g(present)g(e)o(xperimental)g(results)g(which)f(sho)o(w)h(that)f (using)g(a)i(high-le)o(v)o(el)179 1779 y(frame)o(work)f(like)f(Prairie) h(to)g(design)g(lar)o(ge-scale)h(optimizers)f(does)g(not)f(sacri\256ce) j(ef)o(\256cienc)o(y)m(.)75 1931 y FC(1)60 b(Intr)o(oduction)75 2041 y FG(Query)19 b(optimization)e([9,)8 b(12,)f(20])19 b(is)f(a)i(fundamental)e(part)h(of)g(database)f(systems.)40 b(It)18 b(is)h(the)g(process)f(of)75 2103 y(generating)11 b(an)i(ef)o(\256cient)f(access)g(plan)g(for)g(a)h(database)f(query)m(.) 19 b(Informally)m(,)12 b(an)h(access)f(plan)g(is)f(an)i(e)o(x)o (ecution)75 2165 y(strate)o(gy)8 b(for)i(a)f(query;)g(it)f(is)h(the)g (sequence)f(of)h(lo)o(w-le)o(v)o(el)f(database)h(retrie)o(v)o(al)f (operations)g(that,)h(when)f(e)o(x)o(ecuted,)75 2227 y(produce)14 b(the)g(database)g(records)h(that)f(satisfy)f(the)h(query) m(.)26 b(There)15 b(are)g(three)g(basic)f(aspects)g(that)g(de\256ne)g (and)75 2289 y(in\257uence)d(query)g(optimization:)j(the)d(search)g (space,)h(the)f(cost)f(model,)i(and)f(the)g(search)g(strate)o(gy)m(.) 137 2351 y(The)k FB(sear)n(c)o(h)f(space)g FG(is)g(the)h(set)f(of)g (logically)f(equi)o(v)o(alent)g(access)i(plans)f(that)f(can)i(be)g (used)f(to)g(e)o(v)o(aluate)g(a)75 2413 y(query)m(.)27 b(All)14 b(plans)g(in)g(a)h(query')m(s)g(search)g(space)f(return)h(the) f(same)h(result;)h(ho)o(we)o(v)o(er)n(,)g(some)e(plans)g(are)i(more)75 2475 y(ef)o(\256cient)c(than)g(others.)20 b(The)12 b FB(cost)g(model)f FG(assigns)g(a)i(cost)f(to)g(each)h(plan)e(in)h(the)g (search)h(space.)20 b(The)13 b(cost)e(of)i(a)75 2537 y(plan)d(is)g(an)g(estimate)g(of)h(the)f(resources)g(used)g(when)g(the) g(plan)g(is)f(e)o(x)o(ecuted;)i(the)f(lo)o(wer)g(the)g(cost,)g(the)g (better)g(the)p 75 2576 720 2 v 124 2603 a FA(\003)142 2619 y Fz(This)e(research)f(was)g(supported)g(in)h(part)h(by)f(grants)f (from)i(The)f(Uni)o(v)o(ersity)h(of)f(T)m(e)o(xas)g(Applied)f(Research) g(Laboratories,)g(Schlum-)75 2669 y(ber)o(ger)o(,)i(and)f(Digital)i (Equipment)f(Corporation.)964 2793 y FG(1)p eop %%Page: 2 2 2 1 bop 75 14 a FG(plan.)20 b(The)12 b FB(sear)n(c)o(h)h(str)o(ate)n (gy)e FG(is)h(a)h(speci\256cation)e(of)i(which)f(plans)f(in)h(the)h (search)f(space)h(are)g(to)f(be)h(e)o(xamined.)75 77 y(If)i(the)g(search)f(space)h(is)f(small,)i(a)f(viable)f(strate)o(gy)g (is)g(to)h(enumerate)g(and)f(e)o(v)o(aluate)g(e)o(v)o(ery)h(plan.)27 b(Ho)o(we)o(v)o(er)n(,)75 139 y(most)14 b(search)g(spaces,)h(e)o(v)o (en)f(for)h(simple)e(queries,)i(are)g(enormous,)f(and)g(thus)f(query)h (optimizers)f(often)h(need)75 201 y(heuristics)c(to)g(control)g(the)h (number)h(of)f(plans)f(to)h(be)g(e)o(xamined.)137 263 y(T)n(raditionally)m(,)19 b(query)f(optimizers)f(ha)o(v)o(e)i(been)g(b) o(uilt)e(as)h(monolithic)f(subsystems)f(of)j(a)f(DBMS.)i(This)75 325 y(simply)11 b(re\257ects)h(the)g(fact)f(that)g(traditional)f (database)i(systems)f(are)h(themselv)o(es)g(monolithic:)j(the)d (algorithms)75 387 y(used)k(for)g(storing)f(and)h(retrie)o(ving)g(data) g(are)h(hard-wired)f(and)g(are)h(rather)g(dif)o(\256cult)e(to)h (change.)32 b(The)16 b(need)75 449 y(to)e(ha)o(v)o(e)i(e)o(xtensible)d (database)i(systems,)g(and)g(in)f(turn)g(e)o(xtensible)g(optimizers,)h (has)g(long)f(been)h(recognized)75 511 y(in)i(systems)f(like)f(Genesis) i([1],)h(EXODUS)f([3],)i(Starb)o(urst)d([15])h(and)g(Postgres)f([18].) 34 b(Rule-based)16 b(query)75 573 y(optimizers)e(are)h(among)f(the)g (major)h(conceptual)e(adv)o(ances)h(that)g(ha)o(v)o(e)h(been)f (proposed)g(to)g(deal)g(with)g(query)75 635 y(optimizer)f(e)o (xtensibility)e([6\2618,)c(10,)g(11,)h(13].)23 b(The)14 b(e)o(xtensibility)d(translates)h(into)h(the)g(ability)f(to)h (incorporate)75 698 y(ne)o(w)18 b(operators,)i(algorithms,)f(cost)e (models,)j(or)e(search)h(strate)o(gies)e(without)f(changing)h(the)h (optimization)75 760 y(algorithm.)137 822 y(In)12 b(this)f(paper)n(,)i (we)f(describe)g(an)g(algebraic)g(frame)o(work)g(called)f FB(Pr)o(airie)g FG(for)h(specifying)f(rules)h(in)f(a)h(query)75 884 y(optimizer)m(.)k(Prairie)10 b(is)f(similar)g(to)g(other)h(rule)f (speci\256cation)g(languages)f(like)h(Starb)o(urst)g([13])g(and)h(V)-6 b(olcano)9 b([8],)75 946 y(and)14 b(indeed,)h(we)g(ha)o(v)o(e)g(based)f (our)g(work)g(on)g(V)-6 b(olcano)14 b(to)g(capture)g(most)g(of)h(the)f (adv)o(antages)f(of)i(rule-based)75 1008 y(optimizers.)22 b(Ho)o(we)o(v)o(er)n(,)14 b(Prairie)f(attempts)g(to)g(pro)o(vide)f (some)i(ke)o(y)e(features)i(that,)f(we)h(ha)o(v)o(e)f(found,)g (simplify)75 1070 y(the)e(ef)o(fort)g(in)g(writing)e(rules:)124 1165 y(1.)21 b(A)10 b(frame)o(work)h(in)f(which)g(users)g(can)g (de\256ne)h(a)g(query)f(optimizer)g(concisely)g(in)g(terms)g(of)h(a)g (well-de\256ned)179 1228 y(set)e(of)g(operators)f(and)h(algorithms.)15 b FB(All)8 b FG(operators)h(and)g(algorithms)e(are)j(considered)e (\256rst-class)h(objects,)179 1290 y(i.e.,)k FB(any)e FG(of)h(them)g(can)g(occur)g(in)f(an)o(y)h(rule,)g(and)f FB(only)g FG(these)h(operators)f(and)g(algorithms)g(can)h(appear)g(in) 179 1352 y(rules.)22 b(This)12 b(scheme)i(eliminates)e(the)h(need)g (for)h(special)e(classes)h(of)g(operators)g(and)g(algorithms,)g(such) 179 1414 y(as)e(enforcers)g(in)g(V)-6 b(olcano)11 b(and)g(glue)f(in)h (Starb)o(urst,)g(that)g(signi\256cantly)e(complicate)i(rule)g (speci\256cation.)124 1509 y(2.)21 b(A)16 b(frame)o(work)h(in)f(which)g (users)g(can)h(de\256ne)g(a)g(list)e(of)h(properties)g(to)g (characterize)h(the)g(e)o(xpressions)179 1571 y(generated)e(in)f(the)h (optimization)e(process.)27 b(Again,)16 b(the)e(goal)h(here)g(is)f(to)h (allo)o(w)f(the)h(user)g(to)f(treat)h FB(all)179 1633 y FG(properties)10 b(as)i(ha)o(ving)e(equal)h(status.)16 b(This)10 b(is)h(dif)o(ferent)g(from)h(V)-6 b(olcano)11 b(where)h(the)f(user)g(must)g(classify)179 1695 y(properties)f(as)h (logical,)g(physical,)f(or)h(operator/algorithm)e(ar)o(guments.)124 1791 y(3.)21 b(A)10 b(frame)o(work)f(in)h(which)f(users)g(can)h (specify)f(mapping)h(functions)e(between)h(properties)g(concomitantly) 179 1853 y(with)16 b(the)h(corresponding)e(rules.)33 b(This)16 b(contrasts)g(with)g(e)o(xisting)g(approaches)g(in)h(which)f (mappings)179 1915 y(between)g(properties)f(are)i(fragmented)g(into)e (multiple)g(functions)g(and)h(at)h(logically)d(dif)o(ferent)i(places) 179 1977 y(than)11 b(the)g(corresponding)f(rules.)17 b(Research)12 b(into)e(rule-based)h(optimizers)g(has)g(re)o(v)o(ealed)h (that)f(property-)179 2039 y(mapping)f(functions)g(are)i(a)f(major)h (source)f(of)g(user)g(ef)o(fort,)g(so)g(this)f(is)h(an)g(important)f (goal.)124 2135 y(4.)21 b(The)9 b(format)g(\(Prairie\))h(in)e(which)h (users)f(can)i(cleanly)e(specify)h(rules)f(is)h(not)f(necessarily)g (the)h(same)h(format)179 2197 y(needed)i(for)h(generating)f(ef)o (\256cient)h(optimizers.)21 b(Thus,)12 b(there)h(is)g(a)g(need)g(for)g (a)g(pre-processor)f(\(written)179 2259 y(by)f(us\))g(that)f (translates)g(between)h(these)g(competing)f(representations.)137 2354 y(Prairie)k(stri)o(v)o(es)e(for)i(uniformity)d(in)i(dealing)f (with)h(issues)f(that)g(ha)o(v)o(e)i(been)f(a)h(source)f(of)g(most)g (user)g(ef)o(fort)75 2416 y(and)f(potential)f(user)h(errors.)21 b(In)13 b(the)f(follo)o(wing)e(sections,)i(we)g(present)g(the)h (Prairie)f(frame)o(work.)21 b(W)l(e)13 b(e)o(xplain)75 2478 y(ho)o(w)c(our)h(P2V)g(pre-processor)f(maps)h(Prairie)g(rule)g (speci\256cations)f(into)f(V)-6 b(olcano)9 b(rule)h(speci\256cations)f (that)g(can)75 2540 y(be)h(processed)g(ef)o(\256ciently)m(.)15 b(Experimental)9 b(results)g(to)h(support)f(this)f(claim)j(are)f(gi)o (v)o(en)g(in)g(Section)f(4,)i(where)f(we)75 2602 y(compare)h (implementations)d(of)i(the)g(T)m(e)o(xas)g(Instruments)e(Open)i(OODB)g (query)g(optimizer)f(using)g(both)g(Prairie)75 2665 y(and)i(V)-6 b(olcano.)16 b(W)l(e)c(conclude)e(with)g(a)i(summary)f(and)g(related)g (research.)964 2793 y(2)p eop %%Page: 3 3 3 2 bop 75 14 a FC(2)60 b(Prairie:)18 b(A)e(language)e(f)o(or)f(rule)h (speci\256cation)75 124 y FG(The)d(basic)g(concepts)g(and)g (de\256nitions)f(that)h(underly)f(the)h(Prairie)h(model)g(are)g (presented)f(in)g(this)f(section.)16 b(The)75 186 y(goal)c(is)f(to)h (lay)f(a)i(foundation)d(for)i(reasoning)f(about)h(query)f(optimizers)g (algebraically;)h(this)f(is)g(necessary)h(for)75 248 y(our)f(subsequent)e(discussion)g(about)h(translating)g(Prairie)h (speci\256cations)f(to)h(those)f(of)h(V)-6 b(olcano.)75 378 y Fy(2.1)50 b(Notation)11 b(and)h(assumptions)75 471 y Fx(Stor)o(ed)j(Files)f(and)g(Str)o(eams.)47 b FG(A)14 b(\256le)g(is)g FB(stor)n(ed)h FG(if)f(its)f(tuples)g(reside)h(on)g (disk.)25 b(In)14 b(the)g(case)h(of)f(relational)75 533 y(databases,)i(stored)e(\256les)h(are)h(sometimes)f(called)g FB(base)g(r)n(elations)p FG(;)f(we)i(will)e(denote)g(them)i(by)e Fw(R)i FG(or)f Fw(R)1784 540 y Fv(i)1797 533 y FG(.)29 b(In)75 595 y(object-oriented)15 b(schemas,)j(stored)e(\256les)h(are)g FB(classes)p FG(;)h(we)f(will)e(denote)h(them)h(by)f FB(C)h FG(or)g FB(C)1601 602 y Fv(i)1615 595 y FG(.)33 b(Henceforth,)75 657 y(whene)o(v)o(er)9 b(we)h(refer)g(to)f(a)g(stored) g(\256le,)h(we)g(mean)f(a)h(relation)e(or)i(a)f(class;)g(when)g(the)g (distinction)e(is)h(unimportant,)75 719 y(we)15 b(will)e(use)h Fw(F)22 b FG(or)14 b Fw(F)435 726 y Fv(i)450 719 y FG(.)26 b(A)15 b FB(str)n(eam)f FG(is)g(a)g(sequence)h(of)f(tuples)g(and)g(is)g (the)g(result)g(of)g(a)h(computation)e(on)h(one)75 781 y(or)f(more)h(streams)f(or)h(stored)e(\256les;)i(tuples)e(of)h(streams) h(are)f(returned)g(one)g(at)h(a)f(time,)h(typically)e(on)h(demand.)75 844 y(Streams)f(can)f(be)h FB(named)p FG(,)e(denoted)h(by)g Fw(S)746 851 y Fv(i)760 844 y FG(,)g(or)g FB(unnamed)p FG(.)75 972 y Fx(Database)16 b(Operations.)46 b FG(An)17 b FB(oper)o(ation)e FG(is)h(a)h(computation)e(on)i(one)f(or)h(more)g (streams)g(or)g(stored)f(\256les.)75 1034 y(There)i(are)g(two)e(types)h (of)g(database)g(operations)f(in)h(Prairie:)29 b(abstract)17 b(\(or)g(implementation-unspeci\256ed\))75 1096 y(operators)10 b(and)h(concrete)h(algorithms.)j(Each)c(is)g(detailed)f(belo)o(w)m(.) 179 1200 y Fx(Operators.)21 b FG(Abstract)7 b(\(or)g(conceptual\))g FB(oper)o(ators)g FG(sp)o(ecify)g(computati)o(ons)f(on)h(st)o(reams)g (or)g(stored)g(\256les;)270 1262 y(the)o(y)h(are)g(denoted)f(by)g(all)g (capital)g(letters)g(\(e.g.,)j(JOIN\).)e(Operators)f(ha)o(v)o(e)h(two)e (types)h(of)h(parameters:)270 1324 y(essential)h(and)g(additional.)14 b FB(Essential)8 b(par)o(ameters)g FG(are)i(the)g(stream)g(or)g(\256le) g(inputs)e(to)h(an)h(operator;)270 1386 y(these)j(are)h(the)f(primary)h (inputs)d(to)i(be)h(processed)f(by)g(an)g(operator)m(.)23 b FB(Additional)11 b(par)o(ameters)g FG(are)270 1448 y(\252\256ne-grain\272)19 b(quali\256cations)d(of)i(an)g(operator;)j (their)d(purpose)f(is)h(to)g(describe)g(an)g(operator)g(in)270 1510 y(more)10 b(detail)f(than)g(essential)g(parameters.)16 b(As)10 b(e)o(xamples,)g(some)g(operators)f(are)h(described)f(belo)o (w;)270 1573 y(for)15 b(each)g(we)g(e)o(xplicitly)e(indicate)h(their)g (essential)g(parameters)h(and)f(parenthetically)f(note)i(their)270 1635 y(additional)9 b(parameters.)304 1713 y Fu(\017)21 b FG(SOR)m(T\()p Fw(S)504 1720 y Ft(1)524 1713 y FG(\))10 b(sorts)f(stream)h Fw(S)804 1720 y Ft(1)824 1713 y FG(.)16 b(The)10 b(sorting)e(attrib)o(ute)h(is)g(an)h(additional)e(parameter)j (of)f(SOR)m(T)m(.)304 1784 y Fu(\017)21 b FG(RET\()p Fw(F)6 b FG(\))13 b(retrie)o(v)o(es)f(tuples)e(of)j(stored)e(\256le)h Fw(F)6 b FG(.)20 b(Additional)10 b(parameters)j(to)e(RET)h(include)f (the)348 1846 y(selection)f(predicate,)h(the)g(projected)f(attrib)o (utes)g(list,)g(and)h(the)g(output)f(tuple)g(order)m(.)304 1916 y Fu(\017)21 b FG(JOIN\()p Fw(S)490 1923 y Ft(1)509 1916 y FG(,)12 b Fw(S)560 1923 y Ft(2)579 1916 y FG(\))g(joins)e (streams)h Fw(S)884 1923 y Ft(1)915 1916 y FG(and)g Fw(S)1020 1923 y Ft(2)1040 1916 y FG(.)17 b(\()p Fw(S)1111 1923 y Ft(1)1142 1916 y FG(denotes)10 b(the)h FB(outer)g(str)n(eam)f FG(and)h Fw(S)1705 1923 y Ft(2)1736 1916 y FG(denotes)348 1978 y(the)17 b FB(inner)f(str)n(eam)p FG(\).)34 b(Additional)14 b(parameters)k(to)f(JOIN)f(include)h(the)f(join)g(predicate)h(and)348 2040 y(output)9 b(stream)j(tuple)e(order)m(.)270 2119 y(Other)h(operators)f(are)i(de\256ned)g(as)f(the)o(y)g(are)h(needed.) 179 2198 y Fx(Algorithms.)20 b FB(Algorithms)10 b FG(are)k(concrete)f (implementations)f(of)h(conceptual)g(operators;)g(the)o(y)g(will)f(be) 270 2260 y(represented)j(in)f(lo)o(wer)g(case)i(with)d(the)i(\256rst)g (letter)f(capitalized.)27 b(Algorithms)13 b(ha)o(v)o(e)i(at)g(least)f (the)270 2322 y(same)7 b(essential)g(and)g(additional)g(p)o(arameters)g (as)g(the)g(conceptual)f(operators)h(t)o(hat)g(t)o(he)o(y)g(implement.) 1858 2306 y Ft(1)270 2384 y FG(Furthermore,)15 b(there)e(can)h(be,)h (and)e(usually)f(are,)j(se)o(v)o(eral)e(algorithms)f(for)i(a)g (particular)f(operator)m(.)270 2446 y(F)o(or)c(e)o(xample,)g(File)p 588 2446 14 2 v 16 w(scan,)g(Btree)p 803 2446 V 17 w(scan)e(and)h(Inde) o(x)p 1085 2446 V 16 w(scan)g(are)h(all)e(v)o(alid)g(algorithms)f(that) i(implement)270 2508 y(the)14 b(operator)g(RET)m(,)g(and)g(Mer)o(ge)p 814 2508 V 17 w(join)g(and)g(Nested)p 1124 2508 V 15 w(loops)f(are)i(algorithms)e(that)h(implement)f(the)270 2571 y(JOIN)e(operator)m(.)17 b(Dif)o(ferent)10 b(algorithms)g(of)o (fer)i(dif)o(ferent)f(e)o(x)o(ecution)f(ef)o(\256ciencies.)p 75 2611 720 2 v 125 2641 a Fs(1)142 2657 y Fz(Algorithms)g(may)e(ha)o (v)o(e)h Fr(tuning)g(par)o(ameters)d Fz(which)j(are)g(not)g(parameters) f(in)i(the)f(operators)f(the)o(y)h(implement.)964 2793 y FG(3)p eop %%Page: 4 4 4 3 bop 277 17 1396 7 v 277 67 2 51 v 304 52 a Fq(Operator)p 535 67 V 106 w(Description)p 881 67 V 161 w(Additional)9 b(Parameters)p 1297 67 V 49 w(Algorithm)p 1671 67 V 277 73 1396 7 v 277 123 2 51 v 304 133 a Fz(JOIN\()p Fp(S)420 137 y Fs(1)438 133 y Fz(,)g Fp(S)479 137 y Fs(2)497 133 y Fz(\))p 535 123 V 52 w(Join)g(streams)f Fp(S)779 137 y Fs(1)797 133 y Fz(,)i Fp(S)839 137 y Fs(2)p 881 123 V 908 108 a Fz(tuple)p 985 108 12 2 v 13 w(order)p 1297 123 2 51 v 248 w(Nested)p 1430 108 12 2 v 12 w(loops\()p Fp(S)1557 112 y Fs(1)1575 108 y Fz(,)f Fp(S)1616 112 y Fs(2)1634 108 y Fz(\))p 1671 123 2 51 v 1298 125 375 2 v 277 173 2 51 v 535 173 V 881 173 V 908 158 a(join)p 968 158 12 2 v 13 w(predicate)p 1297 173 2 51 v 206 w(Mer)o(ge)p 1422 158 12 2 v 13 w(join\()p Fp(S)1526 162 y Fs(1)1545 158 y Fz(,)g Fp(S)1586 162 y Fs(2)1604 158 y Fz(\))p 1671 173 2 51 v 277 175 1396 2 v 277 232 2 57 v 304 262 a(RET\()p Fp(F)c Fz(\))p 535 232 V 561 266 a(Retrie)o(v)o(e)10 b(\256le)f Fp(F)p 881 232 V 908 213 a Fz(tuple)p 985 213 12 2 v 13 w(order)p 1297 232 2 57 v 1323 225 a(File)p 1383 225 12 2 v 14 w(scan\()p Fp(F)c Fz(\))p 1671 232 2 57 v 277 282 2 51 v 535 282 V 881 282 V 908 267 a(selection)p 1044 267 12 2 v 12 w(predicate)p 1297 282 2 51 v 1298 259 374 2 v 1671 282 2 51 v 277 333 V 535 333 V 881 333 V 908 317 a(projected)p 1050 317 12 2 v 12 w(attrib)o(utes)p 1297 333 2 51 v 1323 308 a(Inde)o(x)p 1410 308 12 2 v 13 w(scan\()p Fp(F)g Fz(\))p 1671 333 2 51 v 277 335 1396 2 v 277 385 2 51 v 304 394 a(SOR)n(T\()p Fp(S)433 398 y Fs(1)450 394 y Fz(\))p 535 385 V 561 396 a(Sort)10 b(stream)f Fp(S)765 400 y Fs(1)p 881 385 V 908 394 a Fz(tuple)p 985 394 12 2 v 13 w(order)p 1297 385 2 51 v 1323 370 a(Mer)o(ge)p 1422 370 12 2 v 13 w(sort\()p Fp(S)1524 374 y Fs(1)1543 370 y Fz(\))p 1671 385 2 51 v 1298 387 375 2 v 277 435 2 51 v 535 435 V 881 435 V 1297 435 V 1323 420 a(Null\()p Fp(S)1424 424 y Fs(1)1443 420 y Fz(\))p 1671 435 V 277 442 1396 7 v 80 518 a FG(T)l(able)i(1:)16 b(Operators)11 b(and)g(algorithms)e(in)i(a)h(centralized)e(query)h (optimizer)g(and)g(their)f(additional)g(parameters)p 88 662 1766 2 v 88 1208 2 546 v 286 725 a Fo(SOR)n(T)f(\(JOIN)f(\(RET)h (\()p Fv(R)588 730 y Fs(1)605 725 y Fo(\),)g(RET)g(\()p Fv(R)742 730 y Fs(2)759 725 y Fo(\)\)\))498 798 y tx@Dict begin tx@NodeDict begin { } /TheNodesort 16 { .5 5.384 0.09999 false .5 19.96799 InitRnode } NewNode end end 498 798 a Fo(SOR)n(T)503 869 y tx@Dict begin tx@NodeDict begin { } /TheNodejoin 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 503 869 a Fo(JOIN)468 1000 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodesort /TheNodejoin InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 468 1000 a 437 940 a tx@Dict begin tx@NodeDict begin { } /TheNoderetr1 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 437 940 a Fo(RET)578 940 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr2 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 578 940 a Fo(RET)468 1000 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoin /TheNoderetr1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 468 1000 a 468 1000 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoin /TheNoderetr2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 468 1000 a 446 1009 a tx@Dict begin tx@NodeDict begin { } /TheNoder1 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 446 1009 a Fv(R)473 1014 y Fs(1)588 1009 y tx@Dict begin tx@NodeDict begin { } /TheNoder2 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 588 1009 a Fv(R)615 1014 y Fs(2)468 1000 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr1 /TheNoder1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 468 1000 a 468 1000 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr2 /TheNoder2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 468 1000 a 155 1103 a Fz(\(a\))16 b(An)g(e)o(xpression)d (and)i(its)h(corresponding)d(operator)155 1153 y(tree)p 976 1195 2 521 v 1329 795 a tx@Dict begin tx@NodeDict begin { } /TheNodemergesort 16 { .5 5.384 1.744 false .5 35.61601 InitRnode } NewNode end end 1329 795 a Fo(Mer)o(ge)p 1418 795 10 2 v 11 w(sort)1315 865 y tx@Dict begin tx@NodeDict begin { } /TheNodenestedloops 16 { .5 5.384 1.728 false .5 42.432 InitRnode } NewNode end end 1315 865 a Fo(Nested)p 1410 865 10 2 v 11 w(loops)1332 1000 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodemergesort /TheNodenestedloops InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1332 1000 a 1271 940 a tx@Dict begin tx@NodeDict begin { } /TheNodefilescanr1 16 { .5 5.384 0.064 false .5 29.544 InitRnode } NewNode end end 1271 940 a Fo(File)p 1324 940 10 2 v 12 w(scan)1412 940 y tx@Dict begin tx@NodeDict begin { } /TheNodefilescanr2 16 { .5 5.384 0.064 false .5 29.544 InitRnode } NewNode end end 1412 940 a Fo(File)p 1465 940 10 2 v 13 w(scan)1332 1000 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodenestedloops /TheNodefilescanr1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1332 1000 a 1332 1000 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodenestedloops /TheNodefilescanr2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1332 1000 a 1310 1009 a tx@Dict begin tx@NodeDict begin { } /TheNoder1 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 1310 1009 a Fv(R)1337 1014 y Fs(1)1452 1009 y tx@Dict begin tx@NodeDict begin { } /TheNoder2 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 1452 1009 a Fv(R)1479 1014 y Fs(2)1332 1000 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodefilescanr1 /TheNoder1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1332 1000 a 1332 1000 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodefilescanr2 /TheNoder2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1332 1000 a 1054 1103 a Fz(\(b\))d(Possible)e(access)f (plan)h(for)i(operator)f(tree)g(in)h(\(a\))p 1852 1208 2 546 v 88 1210 1766 2 v 1853 1218 10 549 v 96 1218 1766 10 v 483 1321 a FG(Figure)h(1:)16 b(Example)11 b(of)g(an)h(operator)e (tree)i(and)f(access)g(plan)75 1501 y(T)l(able)20 b(1)g(lists)e(some)i (operators)f(and)h(algorithms)e(implementing)h(them)h(together)f(with)g (their)g(additional)75 1563 y(parameters.)75 1692 y Fx(Operator)12 b(T)m(r)o(ees.)46 b FG(An)11 b FB(oper)o(ator)e(tr)n(ee)i FG(is)f(a)h(rooted)g(tree)g(whose)f(non-leaf,)h(or)g FB(interior)p FG(,)e(nodes)h(are)i(database)75 1754 y(operations)k (\(operators)h(or)h(algorithms\))f(and)g(whose)g(leaf)h(nodes)f(are)i (stored)e(\256les.)36 b(The)17 b(children)g(of)h(an)75 1816 y(interior)12 b(node)g(in)g(an)h(operator)f(tree)h(are)g(the)g (essential)e(parameters)i(\(i.e.,)i(the)d(stream)h(or)g(\256le)g (parameters\))g(of)75 1878 y(the)e(node.)18 b(Additional)10 b(parameters)i(are)g(implicitly)e(attached)i(to)f(each)h(node.)18 b(Algebraically)m(,)11 b(operator)g(trees)75 1940 y(are)17 b(compositions)c(of)j(database)g(operations;)g(thus,)h(we)f(will)f (also)g(call)h(operator)g(trees)g FB(e)o(xpr)n(essions)p FG(;)g(both)75 2003 y(terms)11 b(will)f(be)i(used)e(interchangeably)m (.)75 2114 y(E)p Fn(XAMPLE)j FG(1.)79 b(A)12 b(simple)g(e)o(xpression)g (and)g(its)g(operator)g(tree)h(representation)e(are)j(sho)o(wn)d(in)h (Figure)g(1\(a\).)75 2177 y(Relations)c Fw(R)291 2184 y Ft(1)320 2177 y FG(and)h Fw(R)430 2184 y Ft(2)459 2177 y FG(are)h(\256rst)f(RET)n(rie)o(v)o(ed,)h(and)g(then)e(JOINed,)i(and)f (\256nally)g(SOR)m(T)m(ed)h(resulting)d(in)i(a)h(stream)75 2239 y(sorted)e(on)g(a)g(speci\256c)h(attrib)o(ute.)14 b(The)8 b(\256gure)h(sho)o(ws)e(only)g(the)h(essential)f(parameters)i (of)f(the)g(v)o(arious)g(operators,)75 2301 y(not)i(the)h(additional)f (parameters.)1225 b Fm(\003)75 2463 y Fx(Descriptors.)45 b FG(A)14 b FB(pr)n(operty)d FG(of)i(a)h(node)e(is)h(a)g(\(user)o (-de\256ned\))h(v)o(ariable)e(that)g(contains)g(information)g(used)h (by)75 2525 y(an)f(optimizer)m(.)17 b(An)11 b FB(annotation)e FG(is)i(a)h Fu(h)p FB(pr)n(operty)m(,)e(value)p Fu(i)h FG(pair)h(that)e(is)h(assigned)g(to)g(a)h(node.)17 b(A)11 b FB(descriptor)g FG(is)g(a)75 2587 y(list)h(of)g(annotations)f(that)h (describes)g(a)h(node)f(of)h(an)g(operator)f(tree;)i(e)o(v)o(ery)f (node)f(has)h(its)f(o)o(wn)g(descriptor)m(.)20 b(As)75 2649 y(an)10 b(e)o(xample,)h(T)l(able)f(2)g(lists)e(some)i(typical)f (properties)g(that)g(might)h(be)g(used)f(in)h(a)g(descriptor)m(.)16 b(It)9 b(must)h(be)g(noted)964 2793 y(4)p eop %%Page: 5 5 5 4 bop 376 17 1198 7 v 376 67 2 51 v 403 52 a Fq(Pr)o(operty)p 719 67 V 198 w(Description)p 1572 67 V 376 73 1198 7 v 376 123 2 51 v 403 108 a Fz(join)p 463 108 12 2 v 13 w(predicate)p 719 123 2 51 v 133 w(join)10 b(predicate)e(for)i(JOIN)f (operator)p 1572 123 V 376 125 1198 2 v 376 175 2 51 v 403 160 a(selection)p 539 160 12 2 v 12 w(predicate)p 719 175 2 51 v 58 w(selection)f(predicate)h(for)g(RET)g(operator)p 1572 175 V 376 177 1198 2 v 376 227 2 51 v 403 212 a(tuple)p 480 212 12 2 v 13 w(order)p 719 227 2 51 v 175 w(tuple)g(order)g(of)h (resulting)f(stream,)g(DONT)p 1322 212 12 2 v 13 w(CARE)g(if)i(none)p 1572 227 2 51 v 376 229 1198 2 v 376 279 2 51 v 403 264 a(num)p 472 264 12 2 v 13 w(records)p 719 279 2 51 v 151 w(number)e(of)g(tuples)g(of)g(resulting)g(stream)p 1572 279 V 376 281 1198 2 v 376 331 2 51 v 403 316 a(tuple)p 480 316 12 2 v 13 w(size)p 719 331 2 51 v 195 w(size)g(of)g(indi)o (vidual)g(tuple)g(in)g(stream)p 1572 331 V 376 332 1198 2 v 376 383 2 51 v 403 368 a(projected)p 545 368 12 2 v 12 w(attrib)o(utes)p 719 383 2 51 v 52 w(list)h(of)g(projected)e (attrib)o(utes)i(for)f(RET)g(operator)p 1572 383 V 376 384 1198 2 v 376 435 2 51 v 403 419 a(attrib)o(utes)p 719 435 V 204 w(list)h(of)g(attrib)o(utes)p 1572 435 V 376 436 1198 2 v 376 486 2 51 v 403 471 a(cost)p 719 486 V 281 w(estimated)f(cost)f(of)i(algorithm)p 1572 486 V 376 493 1198 7 v 546 569 a FG(T)l(able)i(2:)j(Properties)c(of)g (nodes)g(in)f(an)i(operator)e(tree)75 749 y(here)i(that)f(streams)h (and)g(stored)f(\256les)g(may)i(ha)o(v)o(e)f(dif)o(ferent)f(descriptor) g(structures.)17 b(The)12 b(follo)o(wing)d(notations)75 811 y(will)g(be)h(useful)f(in)h(our)g(subsequent)e(discussions.)14 b(If)c Fw(S)962 818 y Fv(i)986 811 y FG(is)g(a)g(stream,)h(then)f Fl(D)1329 818 y Fk(i)1352 811 y FG(is)g(its)f(descriptor)m(.)16 b(Annotations)75 873 y(of)g Fw(S)157 880 y Fv(i)187 873 y FG(are)g(accessed)g(by)f(a)h(structure)f(member)i(relationship,)e (e.g.,)j Fl(D)1247 880 y Fk(i)1261 873 y Fw(:)p FG(num)p 1358 873 14 2 v 15 w(records.)31 b(Also,)16 b(let)f Fw(E)j FG(be)e(an)75 935 y(e)o(xpression)10 b(and)h(let)g Fl(D)g FG(be)h(its)e(descriptor)m(.)16 b(W)l(e)c(will)e(write)h(this)f(as)h Fw(E)k Fj(:)d Fl(D)p FG(.)75 1047 y(E)p Fn(XAMPLE)h FG(2.)77 b(The)11 b(e)o(xpression,)75 1142 y(SOR)m(T)p Fj(\()p FG(JOIN)p Fj(\()p FG(RET)o Fj(\()p Fw(R)461 1149 y Ft(1)480 1142 y Fj(\))h(:)h Fl(D)576 1149 y Fk(3)598 1142 y Fw(;)8 b FG(RET)o Fj(\()p Fw(R)757 1149 y Ft(2)776 1142 y Fj(\))k(:)h Fl(D)872 1149 y Fk(4)894 1142 y Fj(\))f(:)h Fl(D)990 1149 y Fk(5)1012 1142 y Fj(\))f(:)h Fl(D)1108 1149 y Fk(6)75 1238 y FG(corresponds)j(to)g(the)g(operator)h(tree)g(in)f (Figure)h(1\(a\),)i(and)e(represents)f(the)g(join)g(of)h(two)f (relations)f Fw(R)1773 1245 y Ft(1)1809 1238 y FG(and)75 1300 y Fw(R)110 1307 y Ft(2)129 1300 y FG(.)24 b(The)13 b(two)g(relations)f(are)i(\256rst)f(RET)n(rie)o(v)o(ed,)i(then)e (JOINed)g(and)g(\256nally)g(SOR)m(T)m(ed.)24 b Fl(D)1559 1307 y Fk(3)1595 1300 y FG(and)13 b Fl(D)1714 1307 y Fk(4)1750 1300 y FG(are)h(the)75 1362 y(descriptors)9 b(of)i(the)f(two)f(RETs)h(respecti)o(v)o(ely)m(,)g Fl(D)869 1369 y Fk(5)902 1362 y FG(is)g(the)g(descriptor)g(of)g(the)g(JOIN,)h (and)f Fl(D)1553 1369 y Fk(6)1586 1362 y FG(is)g(the)g(descriptor)75 1424 y(of)i(the)g(SOR)m(T)m(.)h(Assuming)d(that)i(the)g(descriptor)f (\256elds)g(for)i(this)e(e)o(xpression)g(are)h(those)g(gi)o(v)o(en)f (in)h(T)l(able)g(2,)g(the)75 1486 y(selection)d(predicate)i(for)f(the)h (\256rst)f(RET)h(is)f Fl(D)814 1493 y Fk(3)836 1486 y Fw(:)p FG(selection)p 1015 1486 V 15 w(predicate,)h(and)f(that)g(for)h (the)f(second)g(RET)h(is)f(gi)o(v)o(en)75 1548 y(by)h Fl(D)172 1555 y Fk(4)194 1548 y Fw(:)p FG(selection)p 373 1548 V 15 w(predicate.)17 b(The)11 b(join)f(predicate)h(of)g(the)h (JOIN)e(node)h(is)g(gi)o(v)o(en)g(by)g Fl(D)1498 1555 y Fk(5)1520 1548 y Fw(:)p FG(join)p 1608 1548 V 15 w(predicate)o(,)h (and)75 1610 y(the)d(attrib)o(utes)f(that)g(are)i(output)e(are)i(gi)o (v)o(en)e(by)h Fl(D)854 1617 y Fk(5)877 1610 y Fw(:)p FG(attrib)o(utes)n(.)16 b(The)9 b(order)g(in)g(which)f(SOR)m(T)i (returns)f(the)g(output)75 1672 y(stream)j(is)e(gi)o(v)o(en)h(by)g Fl(D)457 1679 y Fk(6)479 1672 y Fw(:)p FG(tuple)p 587 1672 V 15 w(order.)1134 b Fm(\003)137 1768 y FG(A)11 b(notational)e(simpli\256cation)g(can)i(be)g(made)g(here.)17 b(Additional)9 b(parameters)i(of)g(operators)f(can)h(be)g(treated)75 1830 y(the)i(same)g(way)g(as)g(other)f(properties)g(of)h(a)h(node;)f (essential)e(parameters,)k(ho)o(we)o(v)o(er)n(,)e(are)h FB(e)o(xpr)n(essions)p FG(.)21 b(Thus,)75 1892 y(the)8 b(term)i(descriptor)d(in)i(the)f(remainder)i(of)e(this)g(paper)h(will)f (refer)h(to)g(a)g(set)f(of)h(properties,)g(including)d(additional)75 1954 y(parameters,)12 b(as)f(sho)o(wn)f(in)h(T)l(able)g(2.)137 2016 y(Currently)m(,)g(descriptor)e(properties)h(are)h(de\256ned)g (entirely)e(by)i(the)f(user;)g(ho)o(we)o(v)o(er)n(,)h(we)g(en)n(vision) e(pro)o(viding)75 2078 y(a)j(hierarchy)e(of)i(pre-de\256ned)f (descriptor)f(types)g(to)h(aid)g(this)f(process.)75 2207 y Fx(Access)h(Plans.)45 b FG(An)11 b FB(access)g(plan)f FG(is)h(an)g(operator)g(tree)g(in)g(which)g(all)f(interior)h(nodes)f (are)i(algorithms.)75 2319 y(E)p Fn(XAMPLE)h FG(3.)75 b(An)8 b(access)g(plan)g(for)h(the)f(operator)g(tree)h(in)f(Figure)g (1\(a\))h(is)f(sho)o(wn)f(in)h(Figure)h(1\(b\).)15 b(Relations)75 2381 y Fw(R)110 2388 y Ft(1)141 2381 y FG(and)d Fw(R)254 2388 y Ft(2)286 2381 y FG(are)g(each)h(retrie)o(v)o(ed)f(using)e(the)i (File)p 873 2381 V 16 w(scan)g(algorithm,)g(joined)e(using)h(Nested)p 1546 2381 V 16 w(loops,)g(and)h(\256nally)75 2443 y(sorted)e(using)g (Mer)o(ge)p 427 2443 V 17 w(sort.)1319 b Fm(\003)964 2793 y FG(5)p eop %%Page: 6 6 6 5 bop 85 -30 1773 2 v 85 388 2 418 v 122 15 a Fp(E)r Fi(\()p Fp(x)189 19 y Fs(1)206 15 y Fp(;)6 b(:)g(:)g(:)g(;)g(x)313 19 y Fh(n)334 15 y Fi(\))11 b(:)f Fg(D)415 19 y Ff(1)445 15 y Fi(=)-6 b Fe(\))11 b Fp(E)548 -3 y FA(0)559 15 y Fi(\()p Fp(x)596 19 y Fs(1)613 15 y Fp(;)6 b(:)g(:)g(:)g(;)g(x)720 19 y Fh(n)741 15 y Fi(\))11 b(:)f Fg(D)822 19 y Ff(2)1788 15 y Fz(\(1\))122 65 y Fe(ff)230 115 y Fz(pre-test)g(statements)122 165 y Fe(gg)122 216 y Fz(test)122 266 y Fe(ff)230 316 y Fz(post-test)f(statements)122 366 y Fe(gg)p 1855 388 V 85 390 1773 2 v 1856 398 10 421 v 93 398 1773 10 v 662 502 a FG(Figure)i(2:)k(General)d(form)f(of)h(a)f(T)l(-rule)75 682 y Fy(2.2)50 b(Prairie)13 b(optimization)e(paradigm)75 775 y FG(Query)k(optimizers)f(map)i(operator)f(trees)g(to)g(access)g (plans.)1063 758 y Ft(2)1111 775 y FG(Prairie)g(admits)g(two)f(rather)h (dif)o(ferent)g(means)75 837 y(of)d(optimization:)k(top-do)o(wn)11 b(and)h(bottom-up.)18 b(A)13 b(top-do)o(wn)d(query)i(optimizer)g (optimizes)f(the)h(parents)g(of)g(a)75 899 y(node)h(prior)h(to)f (optimizing)f(the)i(node)f(itself.)24 b(A)14 b(bottom-up)e(optimizer)h (optimizes)g(the)h(children)f(of)g(a)i(node)75 961 y(prior)f(to)g (optimizing)f(the)i(node.)26 b(The)15 b(earliest)f(optimizers)f (\(System)i(R)g([17])g(and)f(R)1485 944 y Fd(\003)1520 961 y FG([16]\))h(employed)e(the)75 1023 y(bottom-up)d(approach.)137 1085 y(Our)k(research)h(concentrates)f(on)f(a)i(top-do)o(wn)d (optimization)h(of)h(operator)g(trees.)25 b(W)l(e)15 b(ha)o(v)o(e)g(chosen)e(this)75 1147 y(approach)e(because)g(we)h (intend)e(to)h(translate)f(Prairie)i(rules)f(into)f(the)h(format)h (required)f(by)g(the)g(V)-6 b(olcano)10 b(query)75 1209 y(optimizer)16 b(generator)g([8].)31 b(V)-6 b(olcano)16 b(is)f(based)h(on)g(a)g(top-do)o(wn)f(strate)o(gy)m(.)31 b(Gi)o(v)o(en)15 b(an)i(appropriate)e(search)75 1271 y(engine,)g(Prairie)g(can)g(potentially)e(also)h(be)h(used)f(with)g(a)h (bottom-up)e(optimization)g(strate)o(gy;)i(ho)o(we)o(v)o(er)n(,)h(we)75 1333 y(will)10 b(not)h(discuss)e(this)h(approach)h(in)g(this)f(paper)m (.)137 1396 y(In)18 b(query)g(optimization,)g(there)g(are)g(certain)g (annotations)e(\(such)i(as)g(additional)e(parameters\))i(that)f(are)75 1458 y(kno)o(wn)12 b(before)i(an)o(y)g(optimization)e(is)h(be)o(gun.)24 b(These)13 b(annotations)f(can)i(be)f(computed)h(at)f(the)h(time)f (that)g(the)75 1520 y(operator)d(tree)i(is)e(initialized,)f(and)i(will) f(not)g(change)h(with)f(application)f(of)h(rules.)17 b(Our)10 b(follo)o(wing)f(discussions)75 1582 y(assume)i(operator)g (trees)g(are)h(initialized.)75 1712 y Fy(2.3)50 b(T)l(ransf)o(ormation) 12 b(rules)137 1805 y FG(T)n(ransformation)f(rules,)h(or)f(T)l(-rules)g (for)h(short,)f(de\256ne)h(equi)o(v)o(alences)e(among)i(pairs)f(of)g(e) o(xpressions;)f(the)o(y)75 1867 y(de\256ne)j(mappings)e(from)i(one)g (operator)f(tree)h(to)f(another)m(.)21 b(Let)12 b Fw(E)j FG(and)d Fw(E)1264 1851 y Fd(0)1288 1867 y FG(be)g(e)o(xpressions)g (that)f(in)n(v)o(olv)o(e)h(only)75 1929 y(abstract)d(operators.)15 b(Equation)8 b(\(1\))i(\(sho)o(wn)e(in)i(Figure)f(2\))h(sho)o(ws)e(the) h(general)h(form)g(of)f(a)h(T)l(-rule.)16 b(The)9 b(actions)75 1991 y(of)j(a)g(T)l(-rule)g(de\256ne)g(the)f(equi)o(v)o(alences)g (between)g(the)h(descriptors)e(of)i(nodes)f(of)h(the)g(original)e (operator)i(tree)g Fw(E)75 2053 y FG(with)i(the)g(nodes)g(of)g(the)h (output)e(tree)h Fw(E)735 2037 y Fd(0)746 2053 y FG(;)i(these)e (actions)g(consist)f(of)i(a)g(series)f(of)g(\(C)i(or)e(C++\))h (assignment)1857 2037 y Ft(3)75 2116 y FG(statements.)j(The)12 b(left-hand)f(sides)g(of)h(these)f(statements)g(refer)i(to)f (descriptors)e(of)i(e)o(xpressions)f(on)g(the)h(right-)75 2178 y(hand)k(side)f(of)h(the)g(T)l(-rule;)i(the)e(right-hand)f(sides)g (of)h(the)g(statements)f(can)i(refer)g(to)e(an)o(y)i(descriptor)e(in)g (the)75 2240 y(T)l(-rule.)k(Function)11 b(\(called)i FB(helper)f FG(functions\))f(calls)h(can)g(also)g(appear)g(on)g(the)g (right)g(side)f(of)h(the)g(assignment)75 2302 y(statements.)j(Thus,)8 b(descriptors)g(on)g(the)g FB(left-hand)f(side)i FG(of)f(a)h(T)l(-rule) g(are)g FB(ne)o(ver)h FG(changed)e(in)h(the)f(rule')m(s)h(actions.)p 75 2342 720 2 v 125 2369 a Fs(2)142 2385 y Fz(Actually)n(,)j(query)e (optimizers)h(operate)f(on)g(the)h(output)g(of)g(a)g(query)g(compiler)g (which)f(translates)g(a)h(high-le)o(v)o(el)g(query)n(,)g(e.g.,)h(one)75 2435 y(e)o(xpressed)t(in)7 b(SQL,)f(into)h(an)f(intermediate)g (structure)h(called)e(a)h Fr(query)f(gr)o(aph)g Fz(and)h(then)g(into)g (an)g(operator)g(tree.)13 b(The)6 b(query)f(compilation)75 2486 y(process)i(is)j(well-kno)o(wn)f(and)f(we)h(assume)e(it)j(is)f (carried)g(out)h(before)e(query)h(optimization)g(be)o(gins.)125 2517 y Fs(3)142 2533 y Fz(The)e(actions)g(can)g(be)h(non-assignment)d (statements)i(\(like)h(function)g(calls\),)h(b)o(ut)f(in)g(this)g (case,)f(the)g(P2V)h(pre-processor)e(\(described)75 2583 y(in)j(Section)e(3\))i(needs)d(some)i(hints)g(about)f(the)h(properties) g(that)h(are)f(changed)e(by)i(the)g(statement)f(in)i(order)f(to)h (correctly)f(cate)o(gorize)g(each)75 2633 y(property)n(.)13 b(F)o(or)d(simplicity)n(,)f(in)h(this)f(paper)o(,)f(we)h(assume)e(all)j (actions)e(consist)h(of)g(assignment)e(statements.)964 2793 y FG(6)p eop %%Page: 7 7 7 6 bop 75 14 a FG(A)11 b FB(test)g FG(is)g(needed)g(to)g(determine)g (if)g(the)g(transformations)f(of)h(the)g(T)l(-rule)g(are)h(in)e(fact)h (applicable.)137 77 y(Purely)h(as)g(an)g(optimization,)e(it)h(is)g (usually)f(the)i(case)g(that)f(not)g(all)h(statements)e(in)i(a)g(T)l (-rule')m(s)f(actions)g(need)75 139 y(to)k(be)h(e)o(x)o(ecuted)h(prior) e(to)h(a)g(T)l(-rule')m(s)g(test.)30 b(F)o(or)16 b(this)f(reason,)i (the)f(actions)f(of)h(a)g(T)l(-rule)f(are)i(split)d(into)h(two)75 201 y(groups;)j(those)d(that)h(need)g(to)g(be)h(e)o(x)o(ecuted)f(prior) g(to)g(the)g(T)l(-rule')m(s)h(test,)g(and)f(those)g(that)g(can)g(be)h (e)o(x)o(ecuted)75 263 y(after)12 b(a)g(successful)e(test.)16 b(These)c(groups)e(of)h(statements)g(comprise,)g(respecti)o(v)o(ely)m (,)g(the)g FB(pr)n(e-test)h FG(and)f FB(post-test)75 325 y FG(statements)f(of)h(the)g(T)l(-rule.)515 308 y Ft(4)137 387 y FG(W)l(e)j(no)o(w)f(de\256ne)g(the)g(actions)g(and)g (tests)f(of)h(a)h(T)l(-rule)f(more)h(precisely)m(.)22 b(Let)13 b Fw(O)1429 394 y Fv(i)1456 387 y FG(be)g(an)h(abstract)f (operator)75 449 y(of)i Fw(E)165 433 y Fd(0)175 449 y FG(,)h(and)f(let)f Fl(O)382 456 y Fk(i)410 449 y FG(be)h(its)f (descriptor)m(.)26 b(Similarly)m(,)15 b(let)f Fw(I)1016 456 y Fv(i)1045 449 y FG(be)h(an)f(abstract)g(operator)g(of)h Fw(E)i FG(and)d(let)g Fl(I)1746 456 y Fk(i)1774 449 y FG(be)h(its)75 511 y(descriptor)m(.)29 b(\()p Fw(I)330 518 y Fv(i)360 511 y FG(is)15 b(an)g(operator)h(that)e(is)h(input)g(to) g(the)g(rule)g(and)g Fw(O)1195 518 y Fv(i)1225 511 y FG(is)g(an)g(operator)h(that)e(is)h(output)f(by)h(the)75 573 y(rule\).)24 b(Let)14 b Fw(M)315 580 y Fv(i)343 573 y FG(denote)f(the)g Fw(i)p FG(th)g(descriptor)g(property)m(.)23 b(Thus,)14 b Fl(O)1150 580 y Fk(i)1164 573 y Fw(:M)1221 580 y Fv(j)1253 573 y FG(is)f(the)g(v)o(alue)g(of)h(the)g Fw(j)s FG(th)e(property)h(of)75 635 y(descriptor)d Fl(O)307 642 y Fk(i)321 635 y FG(.)18 b(The)11 b(left-hand)g(side)f(of)i(an)f (assignment)g(refers)h(to)f(an)g(output)f(descriptor)g(\()p Fl(O)1604 642 y Fk(i)1618 635 y FG(\))i(or)f(a)h(member)75 698 y(of)g(an)f(output)f(descriptor)h(\()p Fl(O)555 705 y Fk(i)569 698 y Fw(:M)626 705 y Fv(j)644 698 y FG(\).)18 b(The)11 b(right-hand)g(side)g(is)g(an)g(e)o(xpression)g(or)h(a)g (helper)f(function)f(call)i(that)75 760 y(only)e(references)i(input)e (descriptors)g(and/or)g(their)h(members.)17 b(Here)12 b(are)g(a)g(fe)o(w)f(e)o(xamples:)181 850 y Fl(O)220 857 y Fk(i)275 850 y Fj(=)42 b Fl(I)372 857 y Fk(k)407 850 y Fj(;)416 b Fw(==)10 b FG(copy)h(descriptor)f Fl(I)1205 857 y Fk(k)1240 850 y FG(to)g Fl(O)1325 857 y Fk(i)106 912 y Fl(O)145 919 y Fk(i)159 912 y Fw(:M)216 919 y Fv(j)275 912 y Fj(=)42 b Fl(I)372 919 y Fk(k)396 912 y Fw(:M)453 919 y Fv(j)481 912 y Fj(+)10 b(4)h(;)263 b Fw(==)10 b FG(e)o(xpression)h(de\256ning)f Fl(O)1297 919 y Fk(i)1311 912 y Fw(:M)1368 919 y Fv(j)96 975 y Fl(O)135 982 y Fk(3)157 975 y Fw(:M)214 982 y Ft(5)275 975 y Fj(=)42 b FG(helper)11 b Fj(\()p Fl(I)515 982 y Fk(1)537 975 y Fw(:M)594 982 y Ft(5)614 975 y Fw(;)d Fl(I)655 982 y Fk(2)676 975 y Fw(:M)733 982 y Ft(5)752 975 y Fj(\))j(;)42 b Fw(==)10 b FG(helper)h(function)f(that)h(computes)f Fl(O)1484 982 y Fk(3)1507 975 y Fw(:M)1564 982 y Ft(5)836 1037 y Fw(==)g FG(from)i(inputs)e Fl(I)1135 1044 y Fk(1)1157 1037 y Fw(:M)1214 1044 y Ft(5)1245 1037 y FG(and)h Fl(I)1342 1044 y Fk(2)1364 1037 y Fw(:M)1421 1044 y Ft(5)1440 1037 y FG(.)137 1123 y(The)g(test)g(for)g(a)h(T)l(-rule')m(s)f (applicability)d(is)j(a)h(boolean)e(e)o(xpression)g(and)h(normally)g (in)n(v)o(olv)o(es)f(checks)h(on)f(the)75 1185 y(v)o(alues)g(of)i (output)d(descriptors)h(\(e.g.,)i Fl(O)731 1192 y Fk(3)754 1185 y Fw(:M)811 1192 y Ft(5)843 1185 y Fw(>)h Fj(6)p FG(\);)e(occasionally)m(,)f(helper)h(functions)f(may)h(be)g(needed.)137 1247 y(Again,)i(it)f(is)h(important)f(to)g(remember)j(that)d(the)h (pre-test)f(actions)g(are)i(carried)f(out)f(prior)h(to)f(the)h(test;)f (the)75 1310 y(post-test)c(actions)h(are)h(performed)h(only)e(if)h(a)g (T)l(-rule')m(s)g(test)f(e)o(v)o(aluates)g(to)g(TR)n(UE,)h(and)g(all)g (post-test)e(actions)g(are)75 1372 y(performed)14 b(immediately)m(,)g (with)e(no)h(intermediate)g(optimization)e(of)i(an)o(y)h(descendant)e (nodes)h(of)g(the)g(root)g(of)75 1434 y Fw(E)s FG(.)137 1496 y(Note)h(that)g(there)h(are)g(no)f(actions)g(that)f(are)j(carried) e(out)g FB(after)h FG(the)f(essential)f(parameters)i(of)g(the)f(root)g (of)75 1558 y Fw(E)h FG(are)f(optimized.)20 b(This)12 b(is)h(because)f(a)i(T)l(-rule)e(only)g(logically)f(transforms)i(a)g (conceptual)f(tree)h(into)f(another)75 1620 y(conceptual)e(tree.)75 1732 y(E)p Fn(XAMPLE)j FG(4.)79 b(The)14 b(associati)o(vity)c(of)k (JOINs)e(is)h(e)o(xpressed)g(by)g(T)l(-rule)g(\(2\))g(in)g(Figure)g (3\(a\).)24 b(It)13 b(re)o(writes)g(a)75 1794 y(two-way)e(join)i(into)f (an)h(equi)o(v)o(alent)e(operator)i(tree.)23 b(The)13 b(\(single\))f(pre-test)h(statement)g(computes)f(the)h(list)f(of)75 1856 y(attrib)o(utes)h(of)i(the)f(ne)o(w)h(JOIN)f(node)h(on)f(the)g (right)g(side.)27 b(The)14 b(test)g(of)h(the)g(T)l(-rule)f(consists)f (of)i(a)g(call)f(to)g(the)75 1918 y(helper)f(function)g(\252is)p 422 1918 14 2 v 15 w(associati)o(v)o(e\272,)h(which)f(returns)g(TR)n (UE)g(or)h(F)m(ALSE)f(depending)f(on)h(whether)g(the)h(T)l(-rule)75 1980 y(is)j(applicable.)36 b(If)18 b(it)g(is)f(not,)i(then)f(the)f (rule)h(is)f(rejected)h(\(e.g.,)j(because)d(it)f(generates)h(a)g (cross-product\),)75 2042 y(otherwise)d(the)h(post-test)f(statements)g (are)i(e)o(x)o(ecuted.)32 b(The)16 b(post-test)e(statements)i(compute)g (v)o(arious)f(other)75 2105 y(annotations)f(of)i(the)g(ne)o(w)h(nodes)e (that)h(are)h(generated)f(by)g(applying)e(the)j(T)l(-rule.)31 b(Note)16 b(the)g(use)g(of)g(helper)75 2167 y(functions)10 b(\252cardinality\272)g(and)h(\252union\272)f(to)h(compute)g (descriptor)f(properties.)137 2229 y(Consider)g(three)g(relations)f Fw(R)615 2236 y Ft(1)634 2229 y FG(,)i Fw(R)691 2236 y Ft(2)721 2229 y FG(and)f Fw(R)832 2236 y Ft(3)851 2229 y FG(,)h(and)f(let)g Fw(a)1029 2236 y Fv(i)1043 2229 y FG(,)h Fw(b)1085 2236 y Fv(i)1109 2229 y FG(and)f Fw(c)1205 2236 y Fv(i)1229 2229 y FG(be)g(their)g(respecti)o(v)o(e)g(sets)f(of)h (attrib)o(utes.)75 2291 y(Figures)i(3\(b\))f(and)h(3\(c\))h(sho)o(w)m (,)e(respecti)o(v)o(ely)m(,)h(e)o(xamples)g(of)g(the)f(applicability)f (and)i(non-applicability)c(of)k(the)75 2353 y(join)e(associati)o(vity)f (T)l(-rule.)1324 b Fm(\003)p 75 2427 720 2 v 125 2454 a Fs(4)142 2470 y Fz(W)m(e)10 b(suspect)e(it)i(is)g(possible)f(to)h (use)e(data-\257o)o(w)h(analysis)g(to)g(partition)i(the)e(assignment)f (statements)h(automatically)n(,)g(b)o(ut)h(for)h(no)o(w)n(,)75 2520 y(we)e(let)h(the)f(rule-writer)i(do)d(the)h(partitioning.)964 2793 y FG(7)p eop %%Page: 8 8 8 7 bop 75 12 1796 2 v 75 1134 2 1122 v 123 52 a Fz(JOIN)p Fi(\()p Fz(JOIN)p Fi(\()p Fp(S)338 56 y Fs(1)356 52 y Fp(;)6 b(S)396 56 y Fs(2)413 52 y Fi(\))11 b(:)f Fg(D)494 56 y Ff(4)514 52 y Fp(;)c(S)554 56 y Fs(3)571 52 y Fi(\))11 b(:)f Fg(D)652 56 y Ff(5)682 52 y Fi(=)-6 b Fe(\))11 b Fz(JOIN)p Fi(\()p Fp(S)874 56 y Fs(1)891 52 y Fp(;)6 b Fz(JOIN)p Fi(\()p Fp(S)1027 56 y Fs(2)1045 52 y Fp(;)g(S)1085 56 y Fs(3)1103 52 y Fi(\))k(:)h Fg(D)1184 56 y Ff(6)1203 52 y Fi(\))g(:)f Fg(D)1284 56 y Ff(7)1790 52 y Fz(\(2\))123 103 y Fe(ff)232 153 y Fg(D)266 157 y Ff(6)285 153 y Fp(:)p Fz(attrib)o(utes)h Fi(=)g Fz(union)d Fi(\()p Fg(D)629 157 y Ff(2)648 153 y Fp(:)p Fz(attrib)o(utes)p Fp(;)e Fg(D)848 157 y Ff(3)867 153 y Fp(:)p Fz(attrib)o(utes)p Fi(\))k(;)123 203 y Fe(gg)123 253 y Fz(is)p 150 253 12 2 v 14 w(associati)o(v)o(e)d Fi(\()p Fg(D)382 257 y Ff(6)402 253 y Fp(:)p Fz(join)p 473 253 V 13 w(predicate)o Fp(;)f Fg(D)672 257 y Ff(6)691 253 y Fp(:)p Fz(attrib)o(utes)p Fp(;)g Fg(D)891 257 y Ff(5)910 253 y Fp(:)p Fz(join)p 981 253 V 13 w(predicate)o Fi(\))123 304 y Fe(ff)232 354 y Fg(D)266 358 y Ff(7)296 354 y Fi(=)11 b Fg(D)371 358 y Ff(5)399 354 y Fi(;)232 404 y Fg(D)266 408 y Ff(7)285 404 y Fp(:)p Fz(join)p 356 404 V 14 w(predicate)e Fi(=)i Fg(D)590 408 y Ff(4)609 404 y Fp(:)p Fz(join)p 680 404 V 13 w(predicate)d Fi(;)232 454 y Fg(D)266 458 y Ff(6)285 454 y Fp(:)p Fz(tuple)p 373 454 V 13 w(size)i Fi(=)h Fg(D)528 458 y Ff(2)547 454 y Fp(:)p Fz(tuple)p 635 454 V 13 w(size)c Fi(+)i Fg(D)785 458 y Ff(3)804 454 y Fp(:)p Fz(tuple)p 892 454 V 13 w(size)f Fi(;)232 504 y Fg(D)266 508 y Ff(6)285 504 y Fp(:)p Fz(num)p 365 504 V 13 w(records)i Fi(=)g Fz(cardinality)f Fi(\()p Fg(D)755 508 y Ff(2)774 504 y Fp(;)d Fg(D)825 508 y Ff(3)845 504 y Fi(\))j(;)123 555 y Fe(gg)764 631 y Fz(\(a\))g(Join)g(Associati)o(vity)g(T)m(-rule)p 100 682 1745 2 v 319 734 a tx@Dict begin tx@NodeDict begin { } /TheNodejoinr1r2r3 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 319 734 a Fo(JOIN)192 733 y Fv(b)207 738 y Fs(2)234 733 y Ft(=)i Fv(c)287 738 y Fs(1)248 805 y tx@Dict begin tx@NodeDict begin { } /TheNodejoinr1r2 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 248 805 a Fo(JOIN)120 804 y Fv(a)139 809 y Fs(1)166 804 y Ft(=)f Fv(b)218 809 y Fs(1)181 876 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr1 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 181 876 a Fo(RET)323 876 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr2 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 323 876 a Fo(RET)394 806 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr3 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 394 806 a Fo(RET)191 945 y tx@Dict begin tx@NodeDict begin { } /TheNoder1 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 191 945 a Fv(R)218 950 y Fs(1)333 945 y tx@Dict begin tx@NodeDict begin { } /TheNoder2 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 333 945 a Fv(R)360 950 y Fs(2)404 874 y tx@Dict begin tx@NodeDict begin { } /TheNoder3 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 404 874 a Fv(R)431 879 y Fs(3)213 936 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2 /TheNoderetr1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 213 936 a 213 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2 /TheNoderetr2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 213 936 a 213 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2r3 /TheNodejoinr1r2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 213 936 a 213 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2r3 /TheNoderetr3 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 213 936 a 213 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr1 /TheNoder1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 213 936 a 213 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr2 /TheNoder2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 213 936 a 213 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr3 /TheNoder3 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 213 936 a 497 836 a Ft(=)-6 b Fd(\))679 734 y tx@Dict begin tx@NodeDict begin { } /TheNodejoinr1r2r3 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 679 734 a Fo(JOIN)763 733 y Fv(a)782 738 y Fs(1)809 733 y Ft(=)10 b Fv(b)861 738 y Fs(1)750 805 y tx@Dict begin tx@NodeDict begin { } /TheNodejoinr2r3 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 750 805 a Fo(JOIN)836 804 y Fv(b)851 809 y Fs(2)878 804 y Ft(=)g Fv(c)930 809 y Fs(1)613 806 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr1 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 613 806 a Fo(RET)683 876 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr2 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 683 876 a Fo(RET)825 876 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr3 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 825 876 a Fo(RET)622 874 y tx@Dict begin tx@NodeDict begin { } /TheNoder1 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 622 874 a Fv(R)649 879 y Fs(1)693 945 y tx@Dict begin tx@NodeDict begin { } /TheNoder2 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 693 945 a Fv(R)720 950 y Fs(2)835 945 y tx@Dict begin tx@NodeDict begin { } /TheNoder3 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 835 945 a Fv(R)862 950 y Fs(3)644 936 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2r3 /TheNoderetr1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 644 936 a 644 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2r3 /TheNodejoinr2r3 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 644 936 a 644 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr2r3 /TheNoderetr2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 644 936 a 644 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr2r3 /TheNoderetr3 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 644 936 a 644 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr1 /TheNoder1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 644 936 a 644 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr2 /TheNoder2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 644 936 a 644 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr3 /TheNoder3 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 644 936 a 142 1021 a Fz(\(b\))j(Example)d(of)j(the)e(associati)o(vity)g (rule)h(applied)f(to)h(an)142 1072 y(operator)d(tree)p 951 1121 2 440 v 1191 734 a tx@Dict begin tx@NodeDict begin { } /TheNodejoinr1r2r3 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 1191 734 a Fo(JOIN)1063 729 y Fv(a)1082 734 y Fs(2)1109 729 y Ft(=)h Fv(c)1161 734 y Fs(1)1121 805 y tx@Dict begin tx@NodeDict begin { } /TheNodejoinr1r2 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 1121 805 a Fo(JOIN)993 804 y Fv(a)1012 809 y Fs(1)1038 804 y Ft(=)h Fv(b)1091 809 y Fs(1)1054 876 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr1 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1054 876 a Fo(RET)1196 876 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr2 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1196 876 a Fo(RET)1267 806 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr3 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1267 806 a Fo(RET)1064 945 y tx@Dict begin tx@NodeDict begin { } /TheNoder1 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 1064 945 a Fv(R)1091 950 y Fs(1)1206 945 y tx@Dict begin tx@NodeDict begin { } /TheNoder2 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 1206 945 a Fv(R)1233 950 y Fs(2)1276 874 y tx@Dict begin tx@NodeDict begin { } /TheNoder3 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 1276 874 a Fv(R)1303 879 y Fs(3)1086 936 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2 /TheNoderetr1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1086 936 a 1086 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2 /TheNoderetr2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1086 936 a 1086 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2r3 /TheNodejoinr1r2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1086 936 a 1086 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2r3 /TheNoderetr3 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1086 936 a 1086 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr1 /TheNoder1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1086 936 a 1086 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr2 /TheNoder2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1086 936 a 1086 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr3 /TheNoder3 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1086 936 a 1370 836 a Ft(=)-6 b Fd(\))1390 838 y Fv(=)1552 734 y tx@Dict begin tx@NodeDict begin { } /TheNodejoinr1r2r3 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 1552 734 a Fo(JOIN)1623 805 y tx@Dict begin tx@NodeDict begin { } /TheNodejoinr2r3 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 1623 805 a Fo(JOIN)1485 806 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr1 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1485 806 a Fo(RET)1556 876 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr2 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1556 876 a Fo(RET)1698 876 y tx@Dict begin tx@NodeDict begin { } /TheNoderetr3 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1698 876 a Fo(RET)1495 874 y tx@Dict begin tx@NodeDict begin { } /TheNoder1 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 1495 874 a Fv(R)1522 879 y Fs(1)1566 945 y tx@Dict begin tx@NodeDict begin { } /TheNoder2 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 1566 945 a Fv(R)1593 950 y Fs(2)1707 945 y tx@Dict begin tx@NodeDict begin { } /TheNoder3 16 { .5 5.46666 1.1111 false .5 10.56842 InitRnode } NewNode end end 1707 945 a Fv(R)1734 950 y Fs(3)1517 936 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2r3 /TheNoderetr1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1517 936 a 1517 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr1r2r3 /TheNodejoinr2r3 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1517 936 a 1517 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr2r3 /TheNoderetr2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1517 936 a 1517 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinr2r3 /TheNoderetr3 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1517 936 a 1517 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr1 /TheNoder1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1517 936 a 1517 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr2 /TheNoder2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1517 936 a 1517 936 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderetr3 /TheNoder3 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1517 936 a 1015 1021 a Fz(\(c\))11 b(Example)f(of)i(an)e(operator)h(tree)g (where)f(the)h(associa-)1015 1072 y(ti)o(vity)f(rule)g(does)d(not)j (apply)p 1868 1134 2 1122 v 75 1136 1796 2 v 1869 1144 10 1126 v 83 1144 1796 10 v 727 1247 a FG(Figure)i(3:)j(Join)10 b(associati)o(vity)p 85 1392 1773 2 v 85 1806 2 414 v 122 1432 a Fp(E)r Fi(\()p Fp(x)189 1436 y Fs(1)206 1432 y Fp(;)c(:)g(:)g(:)g(;)g(x)313 1436 y Fh(n)334 1432 y Fi(\))11 b(:)f Fg(D)415 1436 y Ff(1)445 1432 y Fi(=)-6 b Fe(\))11 b Fp(A)p Fi(\()p Fp(x)584 1436 y Fs(1)600 1432 y Fp(;)6 b(:)h(:)f(:)g(;)g(x)708 1436 y Fh(n)729 1432 y Fi(\))k(:)h Fg(D)810 1436 y Ff(2)1788 1432 y Fz(\(3\))122 1482 y(test)122 1533 y Fe(ff)230 1583 y Fz(pre-opt)f(statements)122 1633 y Fe(gg)122 1683 y(ff)230 1734 y Fz(post-opt)f(statements)122 1784 y Fe(gg)p 1855 1806 V 85 1808 1773 2 v 1856 1816 10 418 v 93 1816 1773 10 v 654 1919 a FG(Figure)i(4:)16 b(General)11 b(form)h(of)f(an)h(I-rule)75 2099 y Fy(2.4)50 b(Implementation)12 b(rules)75 2192 y FG(Implementation)d(rules,)i(or)f (I-rules)g(for)h(short,)f(de\256ne)g(equi)o(v)o(alences)f(between)h(e)o (xpressions)f(and)h(their)g(imple-)75 2254 y(menting)f(algorithms.)15 b(Let)10 b Fw(E)i FG(be)e(an)g(e)o(xpression)f(and)h Fw(A)g FG(be)g(an)g(algorithm)f(that)h(implements)f Fw(E)s FG(.)15 b(The)10 b(general)75 2316 y(form)i(of)f(an)g(I-rule)h(is)e(gi) o(v)o(en)h(by)g(Equation)e(\(3\))i(\(sho)o(wn)f(in)h(Figure)g(4\).)137 2378 y(The)f(actions)e(associated)h(with)f(an)i(I-rule)f(are)i (de\256ned)e(in)g(three)h(parts.)15 b(The)10 b(\256rst)f(part,)h(or)g FB(test)p FG(,)f(is)g(a)h(boolean)75 2440 y(e)o(xpression)g(whose)h(v)o (alue)f(determines)h(whether)g(or)g(not)g(the)f(rule)h(can)h(be)f (applied.)137 2503 y(The)17 b(second)g(part,)i(or)e FB(pr)n(e-opt)f (statements)p FG(,)h(is)g(a)g(set)g(of)g(descriptor)f(assignment)g (statements)g(that)h(are)75 2565 y(e)o(x)o(ecuted)f(only)f(if)h(the)g (test)f(is)g(true)h(and)g FB(befor)n(e)g FG(an)o(y)g(of)g(the)f(inputs) g Fw(x)1249 2572 y Fv(i)1279 2565 y FG(of)h Fw(E)i FG(are)f(optimized.) 30 b(Additional)75 2627 y(parameters)12 b(of)f(nodes)g(are)h(usually)d (assigned)h(in)h(the)g(pre-opt)g(section.)16 b(This)10 b(is)h(necessary)g(before)h(an)o(y)f(of)g(the)964 2793 y(8)p eop %%Page: 9 9 9 8 bop 85 12 1773 2 v 85 426 2 414 v 122 52 a Fz(SOR)n(T)o Fi(\()p Fp(S)253 56 y Fs(1)270 52 y Fi(\))11 b(:)f Fg(D)351 56 y Ff(2)381 52 y Fi(=)-6 b Fe(\))11 b Fz(Mer)o(ge)p 553 52 12 2 v 13 w(sort)p Fi(\()p Fp(S)658 56 y Fs(1)676 52 y Fi(\))f(:)h Fg(D)757 56 y Ff(3)1788 52 y Fz(\(4\))122 103 y Fi(\()p Fg(D)171 107 y Ff(2)190 103 y Fp(:)p Fz(tuple)p 278 103 V 13 w(order)e Fi(!)t(=)h Fz(DONT)p 538 103 V 14 w(CARE)o Fi(\))122 153 y Fe(ff)230 203 y Fg(D)264 207 y Ff(3)294 203 y Fi(=)h Fg(D)369 207 y Ff(2)397 203 y Fi(;)122 253 y Fe(gg)122 304 y(ff)230 354 y Fg(D)264 358 y Ff(3)284 354 y Fp(:)p Fz(cost)e Fi(=)i Fg(D)440 358 y Ff(1)459 354 y Fp(:)p Fz(cost)c Fi(+)i(\()p Fg(D)626 358 y Ff(3)645 354 y Fp(:)p Fz(num)p 725 354 V 12 w(records)o Fi(\))g Fe(\003)g Fi(log)q(\()p Fg(D)995 358 y Ff(3)1014 354 y Fp(:)p Fz(num)p 1094 354 V 13 w(records)o Fi(\))g(;)122 404 y Fe(gg)p 1855 426 2 414 v 85 428 1773 2 v 1856 436 10 418 v 93 436 1773 10 v 650 539 a FG(Figure)i(5:)16 b(Mer)o(ge-sort)11 b(sort)g(algorithm)75 719 y(nodes)f(on)h(the)g (right)f(side)h(can)g(be)h(optimized.)137 782 y(The)19 b(third)f(part,)i(or)f FB(post-opt)e(statements)p FG(,)i(is)f(a)h(set)g (of)g(descriptor)e(assignment)h(statements)f(that)i(are)75 844 y(e)o(x)o(ecuted)f FB(after)f FG(all)g Fw(x)446 851 y Fv(i)477 844 y FG(are)h(optimized.)34 b(Normally)m(,)19 b(the)e(post-opt)e(statements)i(compute)g(cost)f(properties)75 906 y(that)f(can)g(only)g(be)g(determined)g(once)g(the)g(inputs)f(to)h (the)g(algorithm)f(are)i(completely)e(optimized)h(and)g(their)75 968 y(costs)e(kno)o(wn.)25 b(This)14 b FB(does)g(not)p FG(,)g(ho)o(we)o(v)o(er)n(,)i(imply)e(a)g(bottom-up)f(optimization)g (strate)o(gy)m(.)25 b(It)15 b(simply)e(means)75 1030 y(that)f(although)g(I-rules)g(are)i(applied)e(to)g(parents)h(before)g (their)f(children)g(are)i(optimized,)f(the)g FB(cost)g FG(\(and)g(other)75 1092 y(properties)h(in)g(the)h(post-opt)e (section\))h(of)h(the)g(parent)f(cannot)g(be)h(computed)g(until)e(the)i (children)f(ha)o(v)o(e)h(been)75 1154 y(optimized.)75 1266 y(E)p Fn(XAMPLE)e FG(5.)78 b(Equation)11 b(\(4\))h(\(in)g(Figure)g (5\))g(sho)o(ws)e(the)i(I-rule)g(that)g(implements)f(the)h(SOR)m(T)h (operator)f(by)75 1328 y(Mer)o(ge)p 195 1328 14 2 v 17 w(sort.)21 b(I-rule)13 b(\(4\))g(re)o(writes)f(a)i(stream)f(such)f (that)g(it)h(is)f(sorted)g(using)g(the)g(Mer)o(ge)p 1499 1328 V 18 w(sort)g(algorithm.)20 b(The)75 1390 y(test)14 b(for)h(this)f(I-rule)h(is)g(that)f(the)h(tuple)f(order)h(of)g(the)g (sorted)f(stream)h(must)g(not)f(be)h(a)g(DONT)p 1621 1390 V 16 w(CARE)g(order)m(.)75 1452 y(The)g(pre-opt)g(section)f (consists)g(of)h(the)g(default)f(statement)h(that)g(copies)f(the)h (descriptor)g(from)h(the)f(left)g(side)75 1515 y(to)g(the)f(e)o (xpression)g(on)h(the)g(right.)27 b(The)15 b(post-opt)e(section)h (consists)g(of)h(a)g(cost-assigning)d(statement)j(to)f(the)75 1577 y(Mer)o(ge)p 195 1577 V 17 w(sort)d(node.)1451 b Fm(\003)75 1722 y FG(E)p Fn(XAMPLE)13 b FG(6.)74 b(Equation)7 b(\(5\))i(\(sho)o(wn)e(in)h(Figure)g(6\))h(is)e(the)i(I-rule)f(that)g (selects)f(the)i(Nested)p 1579 1722 V 15 w(loops)e(algorithm)75 1784 y(to)12 b(implement)g(the)h(JOIN)f(operator)m(.)20 b(The)13 b(test)f(for)g(this)g(rule)g(is)g(TR)n(UE)h(since)f(Nested)p 1486 1784 V 16 w(loops)f(can)i(be)f(applied)75 1846 y(re)o(gardless)k (of)h(an)o(y)h(property)e(v)o(alues.)33 b(The)17 b(pre-opt)f(section)g (consists)f(of)i(three)g(assignment)f(statements.)75 1908 y(The)11 b(\256rst)h(statement)e(sets)h(the)g(descriptor)g(of)g (Nested)p 945 1908 V 16 w(loops)f(to)h(that)f(of)i(the)f(JOIN.)g(The)h (ne)o(xt)f(two)f(statements)75 1970 y(e)o(xpress)i(the)f(fact)h(that)f (the)g(tuple)g(order)h(of)g(Nested)p 908 1970 V 15 w(loops)f(is)g(the)h (same)g(as)g(the)f(tuple)g(order)h(of)g(its)f(left)g(\(outer\))75 2032 y(input;)h(all)g(other)g(properties)g(remain)h(the)f(same.)21 b(The)13 b(third)f(statement)g(in)g(the)g(pre-opt)g(section)g(ensures)g (that)75 2094 y(this)e(requirement)h(is)g(met)g(by)g(setting)f(the)h (tuple)p 856 2094 V 15 w(order)g(of)g Fw(S)1052 2101 y Ft(1)1083 2094 y FG(on)g(the)g(right)f(side.)1389 2078 y Ft(5)p 75 2135 720 2 v 125 2162 a Fs(5)142 2178 y Fz(Actually)n(,)17 b(it)f(is)f(not)g(enough)f(to)h(simply)g(set)g(the)g(desired)g(tuple)g (order)g(of)g Fp(S)1216 2182 y Fs(1)1234 2178 y Fz(;)k(it)d(is)f(also)g (necessary)e(to)i(ensure)f(that)h Fr(after)75 2228 y Fz(optimization,)e Fp(S)309 2232 y Fs(1)339 2228 y Fz(does)d(indeed)h (ha)o(v)o(e)g(the)h(required)f(property)n(.)21 b(One)12 b(way)f(to)h(satisfy)f(this)h(is)g(to)g(insert)h(a)e(SOR)n(T)g(node)g (in)h(front)h(of)75 2278 y Fp(S)98 2282 y Fs(1)126 2278 y Fz(that)d(can)g(meet)g(the)g(sortedness)e(requirement)i(of)g Fp(S)815 2282 y Fs(1)833 2278 y Fz(.)17 b(Thus,)9 b(in)i(this)f(case,)f (we)h(would)g(need)e(a)i(T)m(-rule)h(\(which)f(introduces)f(a)h(ne)o(w) 75 2328 y(operator)f(JOPR\),)75 2412 y(JOIN)p Fi(\()p Fp(S)194 2416 y Fs(1)212 2412 y Fp(;)d(S)252 2416 y Fs(2)269 2412 y Fi(\))11 b(:)f Fg(D)350 2416 y Ff(3)380 2412 y Fi(=)-6 b Fe(\))11 b Fz(JOPR)o Fi(\()p Fz(SOR)n(T)o Fi(\()p Fp(S)686 2416 y Fs(1)704 2412 y Fi(\))f(:)h Fg(D)785 2416 y Ff(4)804 2412 y Fp(;)6 b Fz(SOR)n(T)o Fi(\()p Fp(S)952 2416 y Fs(2)970 2412 y Fi(\))11 b(:)f Fg(D)1051 2416 y Ff(5)1070 2412 y Fi(\))h(:)f Fg(D)1151 2416 y Ff(6)1170 2412 y Fp(;)75 2495 y Fz(and)e(an)h(I-rule,)75 2579 y(JOPR)o Fi(\()p Fp(S)200 2583 y Fs(1)218 2579 y Fp(;)d(S)258 2583 y Fs(2)276 2579 y Fi(\))k(:)h Fg(D)357 2583 y Ff(3)387 2579 y Fi(=)-6 b Fe(\))10 b Fz(Nested)p 566 2579 12 2 v 12 w(loops)o Fi(\()p Fp(S)695 2583 y Fs(1)724 2579 y Fi(:)g Fg(D)779 2583 y Ff(4)798 2579 y Fp(;)c(S)838 2583 y Fs(2)856 2579 y Fi(\))11 b(:)f Fg(D)937 2583 y Ff(5)956 2579 y Fp(:)75 2662 y Fz(In)f(our)h (discussions,)c(this)k(additional)f(le)o(v)o(el)g(of)h(detail)f(will)h (be)f(ignored)f(for)i(the)f(sake)f(of)h(simplicity)n(.)964 2793 y FG(9)p eop %%Page: 10 10 10 9 bop 85 12 1773 2 v 85 526 2 515 v 122 52 a Fz(JOIN)o Fi(\()p Fp(S)240 56 y Fs(1)258 52 y Fp(;)6 b(S)298 56 y Fs(2)316 52 y Fi(\))11 b(:)f Fg(D)397 56 y Ff(3)427 52 y Fi(=)-6 b Fe(\))10 b Fz(Nested)p 606 52 12 2 v 13 w(loops)n Fi(\()p Fp(S)735 56 y Fs(1)764 52 y Fi(:)g Fg(D)819 56 y Ff(4)838 52 y Fp(;)c(S)878 56 y Fs(2)896 52 y Fi(\))11 b(:)f Fg(D)977 56 y Ff(5)1788 52 y Fz(\(5\))122 103 y(TR)o(UE)122 153 y Fe(ff)230 203 y Fg(D)264 207 y Ff(5)294 203 y Fi(=)h Fg(D)369 207 y Ff(3)397 203 y Fi(;)230 253 y Fg(D)264 257 y Ff(4)294 253 y Fi(=)g Fg(D)369 257 y Ff(1)397 253 y Fi(;)230 304 y Fg(D)264 308 y Ff(4)284 304 y Fp(:)p Fz(tuple)p 372 304 V 13 w(order)f Fi(=)h Fg(D)547 308 y Ff(3)566 304 y Fp(:)p Fz(tuple)p 654 304 V 13 w(order)e Fi(;)122 354 y Fe(gg)122 404 y(ff)230 454 y Fg(D)264 458 y Ff(5)284 454 y Fp(:)p Fz(cost)g Fi(=)i Fg(D)440 458 y Ff(4)459 454 y Fp(:)p Fz(cost)c Fi(+)i(\()p Fg(D)626 458 y Ff(4)645 454 y Fp(:)p Fz(num)p 725 454 V 12 w(records)o Fi(\))g Fe(\003)g Fg(D)931 458 y Ff(2)950 454 y Fp(:)p Fz(cost)f Fi(;)122 504 y Fe(gg)p 1855 526 2 515 v 85 528 1773 2 v 1856 536 10 518 v 93 536 1773 10 v 631 640 a FG(Figure)j(6:)16 b(Nested)10 b(loops)g(join)g(algorithm)137 820 y(The)i(post-opt)e(section)h(is)h(e) o(x)o(ecuted)g(after)g Fw(S)860 827 y Ft(1)892 820 y FG(and)g Fw(S)998 827 y Ft(2)1030 820 y FG(are)g(optimized;)f(it)h (consists)e(of)i(a)g(single)f(statement)75 882 y(that)d(assigns)f(the)i (cost)f(of)h(the)f(Nested)p 680 882 14 2 v 16 w(loops)f(node.)16 b(The)8 b(cost)g(is)h(indicati)o(v)o(e)e(of)i(the)f(fact)h(that)f(in)g (this)g(algorithm,)75 944 y(each)k(tuple)e(of)h(the)g(stream)h Fw(S)549 951 y Ft(1)580 944 y FG(in)n(v)o(olv)o(es)e(scanning)f(the)i (entire)g(stream)h Fw(S)1257 951 y Ft(2)1276 944 y FG(;)f Fw(S)1328 951 y Ft(1)1359 944 y FG(is)g(scanned)g(only)f(once.)92 b Fm(\003)75 1108 y Fy(2.5)50 b(Null)12 b(algorithm)75 1201 y FG(Recall)e(that,)g(in)g(Section)f(1,)i(we)f(mentioned)f(that)g (Prairie)h(allo)o(ws)f(users)h(to)f(treat)h(all)g(operators)f(and)h (algorithms)75 1263 y(as)f(\256rst-class)f(objects,)h(i.e.,)h(all)f (operators)f(and)g(algorithms)g(are)h(e)o(xplicit,)g(in)f(contrast)g (to)g(enforcers)i(in)e(V)-6 b(olcano)75 1325 y(or)13 b(glue)f(in)g(Starb)o(urst.)21 b(This)12 b(requires)g(that)g(Prairie)h (pro)o(vide)f(a)i(mechanism)f(where)g(users)f(can)h(also)f (\252delete\272)75 1387 y(one)i(or)g(more)h(of)f(the)g(e)o(xplicit)f (operators)g(from)i(e)o(xpressions.)23 b(This)14 b(is)f(done)h(by)f(ha) o(ving)h(a)g(special)g(class)f(of)75 1449 y(I-rules)f(that)g(ha)o(v)o (e)h(the)f(form)g(gi)o(v)o(en)g(by)g(Equation)f(\(6\))h(in)g(Figure)g (7\(a\).)20 b(The)13 b(left)f(side)f(of)i(the)f(rule)g(is)g(a)g(single) 75 1511 y(abstract)k(operator)g Fw(O)i FG(with)d(one)h(stream)h(input)e Fw(S)909 1518 y Ft(1)929 1511 y FG(.)33 b(The)16 b(right)g(side)f(of)i (the)f(rule)g(is)g(an)h(algorithm)e(called)75 1573 y(\252Null\272)e (with)f(the)h(same)h(stream)f(input)f(b)o(ut)h(with)f(a)h(dif)o(ferent) g(descriptor)m(.)22 b(As)13 b(the)g(name)h(suggests,)e(the)h(Null)75 1635 y(algorithm)d(is)g(supposed)g(to)g(pass)g(its)h(input)e(unchanged) h(to)h(algorithms)e(abo)o(v)o(e)i(it)g(in)f(an)h(operator)g(tree.)17 b(This)10 b(is)75 1697 y(accomplished)g(in)h(the)g(I-rule)g(as)g(follo) o(ws.)137 1759 y(The)h(test)g(for)g(this)f(I-rule)h(is)g(always)e(TR)n (UE,)j(i.e.,)g(an)o(y)f(node)g(in)g(an)g(operator)g(tree)g(with)f Fw(O)i FG(as)f(its)g(operator)75 1822 y(can)j(be)g(implemented)g(by)f (the)h(Null)f(algorithm.)27 b(The)15 b(actions)f(associated)g(with)g (this)g(rule)g(ha)o(v)o(e)i(a)f(speci\256c)75 1884 y(pattern.)21 b(The)13 b(pre-opt)f(section)g(consists)f(of)i(three)g(statements.)21 b(The)12 b(\256rst)h(statement)f(copies)h(the)f(descriptor)75 1946 y(of)g(the)g(operator)g Fw(O)i FG(to)e(the)g(algorithm)f(Null.)19 b(The)13 b(second)e(statement)h(sets)g(the)g(descriptor)f(of)i(the)f (stream)g Fw(S)1855 1953 y Ft(1)75 2008 y FG(on)g(the)g(right)g(side)f (to)h(the)h(descriptor)e(of)h(the)g(stream)h Fw(S)976 2015 y Ft(1)1008 2008 y FG(on)f(the)h(left)f(side.)19 b(Why)12 b(is)g(it)g(necessary)g(to)g(do)g(this?)75 2070 y(The)f(ke)o(y)f(lies)h(in)f(the)h(third)f(statement.)16 b(This)10 b(statement)g(copies)g(the)h(property)f(\252property\272)h (of)g(the)f(operator)h Fw(O)75 2132 y FG(node)g(on)g(the)g(left)g(side) g(to)g(the)g(\252property\272)g(of)h(the)f(input)f(stream)i Fw(S)1159 2139 y Ft(1)1190 2132 y FG(on)f(the)g(right)g(side.)16 b(Since)c(left-hand)f(side)75 2194 y(descriptors)h(cannot)g(be)i (changed)f(in)f(an)i(I-rule,)g(a)g(ne)o(w)f(descriptor)f Fl(D)1232 2201 y Fk(3)1268 2194 y FG(is)h(necessary)g(for)g Fw(S)1596 2201 y Ft(1)1629 2194 y FG(to)g(con)n(v)o(e)o(y)g(the)75 2256 y(property)d(propagation)g(information.)137 2318 y(The)h(post-opt)f(section)g(in)g(the)h(I-rule)g(has)g(only)f(a)i (cost-assignment)d(statement;)h(this)g(simply)g(sets)h(the)g(cost)75 2380 y(of)g(the)g(Null)f(node)h(to)g(the)g(cost)f(of)h(its)g(optimized) f(input)g(stream.)137 2443 y(The)h(Null)f(algorithm,)h(therefore,)h (serv)o(es)f(to)g(ef)o(fecti)o(v)o(ely)g(transform)g(a)g(single)f (operator)h(to)g(a)g(no-op.)75 2554 y(E)p Fn(XAMPLE)i FG(7.)80 b(Equation)12 b(\(7\))i(\(in)f(Figure)h(7\(b\)\))g(sho)o(ws)e (the)i(I-rule)g(that)f(re)o(writes)g(the)h(SOR)m(T)g(operator)g(to)75 2617 y(use)f(a)g(Null)e(algorithm.)21 b(The)12 b(third)g(pre-opt)g (statement)g(sets)h(the)f(tuple)g(order)h(of)f Fw(S)1439 2624 y Ft(1)1472 2617 y FG(on)g(the)h(right)f(side)g(to)g(be)952 2793 y(10)p eop %%Page: 11 11 11 10 bop 75 12 1800 2 v 75 679 2 667 v 135 61 a Fp(O)q Fi(\()p Fp(S)203 65 y Fs(1)221 61 y Fi(\))10 b(:)g Fg(D)301 65 y Ff(2)331 61 y Fi(=)-6 b Fe(\))11 b Fz(Null)p Fi(\()p Fp(S)508 65 y Fs(1)537 61 y Fi(:)f Fg(D)592 65 y Ff(3)611 61 y Fi(\))h(:)f Fg(D)692 65 y Ff(4)919 61 y Fz(\(6\))135 111 y(TR)o(UE)135 161 y Fe(ff)244 211 y Fg(D)278 215 y Ff(4)307 211 y Fi(=)h Fg(D)382 215 y Ff(2)411 211 y Fi(;)244 262 y Fg(D)278 266 y Ff(3)307 262 y Fi(=)g Fg(D)382 266 y Ff(1)411 262 y Fi(;)244 312 y Fg(D)278 316 y Ff(3)297 312 y Fp(:)p Fz(property)f Fi(=)g Fg(D)519 316 y Ff(2)538 312 y Fp(:)p Fz(property)f Fi(;)135 362 y Fe(gg)135 412 y(ff)244 463 y Fg(D)278 467 y Ff(4)297 463 y Fp(:)p Fz(cost)g Fi(=)i Fg(D)453 467 y Ff(3)472 463 y Fp(:)p Fz(cost)d Fi(;)135 513 y Fe(gg)284 616 y Fz(\(a\))h(General)g(form)h(of)f(a)g (\252Null\272)g(I-rule)p 985 666 2 642 v 1010 52 a(SOR)n(T)o Fi(\()p Fp(S)1141 56 y Fs(1)1159 52 y Fi(\))h(:)h Fg(D)1240 56 y Ff(2)1269 52 y Fi(=)-6 b Fe(\))11 b Fz(Null)p Fi(\()p Fp(S)1446 56 y Fs(1)1475 52 y Fi(:)f Fg(D)1530 56 y Ff(3)1549 52 y Fi(\))h(:)f Fg(D)1630 56 y Ff(4)1794 52 y Fz(\(7\))1010 111 y(TR)o(UE)1010 161 y Fe(ff)1119 211 y Fg(D)1153 215 y Ff(4)1183 211 y Fi(=)g Fg(D)1257 215 y Ff(2)1286 211 y Fi(;)1119 262 y Fg(D)1153 266 y Ff(3)1183 262 y Fi(=)g Fg(D)1257 266 y Ff(1)1286 262 y Fi(;)1119 312 y Fg(D)1153 316 y Ff(3)1172 312 y Fp(:)p Fz(tuple)p 1260 312 12 2 v 13 w(order)g Fi(=)h Fg(D)1435 316 y Ff(2)1454 312 y Fp(:)p Fz(tuple)p 1542 312 V 13 w(order)e Fi(;)1010 362 y Fe(gg)1010 412 y(ff)1119 463 y Fg(D)1153 467 y Ff(4)1172 463 y Fp(:)p Fz(cost)g Fi(=)i Fg(D)1328 467 y Ff(3)1347 463 y Fp(:)p Fz(cost)d Fi(;)1010 513 y Fe(gg)1248 616 y Fz(\(b\))i(Null)g(sort)f(algorithm)p 1873 679 2 667 v 75 681 1800 2 v 1874 688 10 670 v 83 688 1800 10 v 612 792 a FG(Figure)i(7:)16 b(The)11 b(\252Null\272)f(algorithm)h (concept)75 972 y(the)g(tuple)g(order)h(of)g(the)f(SOR)m(T)h(node,)g (thus)e(ensuring)h(that)g(when)g Fw(S)1181 979 y Ft(1)1213 972 y FG(is)g(optimized)f(on)i(the)f(right)g(side,)g(it)g(will)75 1034 y(ha)o(v)o(e)h(the)e(same)i(tuple)f(order)g(as)g(the)g(SOR)m(T)h (node.)947 b Fm(\003)75 1221 y FC(3)60 b(The)14 b(P2V)h(pr)o(e-pr)o (ocessor)75 1330 y FG(In)i(Section)f(1,)j(we)e(enumerated)g(the)g(four) f(primary)h(goals)f(of)h(Prairie,)i(viz.,)g(uniformity)c(in)i(operator) f(and)75 1393 y(algorithms;)6 b(uniformity)h(in)g(properties;)e (uniformity)i(in)g(property)o(-transformatio)o(ns;)e(and)i(ef)o (\256cient)g(generation)75 1455 y(of)i(Prairie)g(optimizers.)15 b(The)9 b(\256rst)g(three)g(goals)f(are)i(dri)o(v)o(en)f(by)f(the)h (need)g(for)g(conceptual)f(simplicity;)g(ho)o(we)o(v)o(er)n(,)75 1517 y(the)o(y)16 b(alone)g(do)f(not)h(necessarily)f(generate)h(ef)o (\256cient)g(optimizers.)31 b(The)16 b(P2V)g(pre-processor)f(ensures)h (that)75 1579 y(ef)o(\256cient)d(optimizers)g(can)g(be)g(realized)h (from)f(Prairie)h(speci\256cations,)f(by)g(translating)e(them)i(to)g (the)g(V)-6 b(olcano)75 1641 y(frame)o(work)15 b(and)f(then)g (generating)g(an)h(optimizer)f(by)g(compiling)g(with)f(the)i(V)-6 b(olcano)14 b(search)h(engine.)26 b(This)75 1703 y(Prairie)13 b(optimizer)o(-generator)f(paradigm)h(is)g(sho)o(wn)e(schematically)h (in)h(Figure)f(8.)22 b(The)13 b(pre-processor)f(itself)75 1765 y(is)h(4500)g(lines)g(of)k Fc(flex)e FG(and)f Fc(bison)h FG(code.)25 b(In)14 b(this)f(section,)h(we)g(describe)f(the)h (pre-processor)f(steps)g(and)75 1827 y(e)o(xplain)d(why)h(the)g (Prairie-to-V)-6 b(olcano)10 b(transformation)g(is)h(non-tri)o(vial.)75 1958 y Fy(3.1)50 b(Corr)o(espondence)12 b(of)g(elements)h(in)f(Prairie) h(and)f(V)-5 b(olcano)75 2050 y FG(T)l(able)14 b(3)g(sho)o(ws)e(the)i (relationship)e(between)h(the)h(basic)f(elements)h(of)g(a)g(Prairie)h (and)e(V)-6 b(olcano)14 b(speci\256cation;)75 2113 y(these)c (correspondences)g(are)i(preserv)o(ed)f(by)g(the)f(P2V)h(pre-processor) m(.)17 b(Operators)10 b(and)h(algorithms)e(in)i(Prairie)75 2175 y(correspond)f(directly)h(to)f(operators)h(and)g(algorithms,)f (respecti)o(v)o(ely)m(,)h(in)f(V)-6 b(olcano.)137 2237 y(The)11 b(concept)f(of)h(enforcer)o(-operators)g(and)f(enforcer)o (-algorithms)g(needs)h(some)g(e)o(xplanation.)k(In)c(a)g(Prairie)75 2299 y(speci\256cation,)f(one)h(can)h(ha)o(v)o(e)g(a)f(set)g(of)g (I-rules)g(of)g(the)g(form:)75 2394 y Fw(O)q Fj(\()p Fw(S)157 2401 y Ft(1)176 2394 y Fj(\))i(:)f Fl(D)272 2401 y Fk(2)336 2394 y Fj(=)-8 b Fu(\))43 b Fw(A)485 2401 y Ft(1)504 2394 y Fj(\()p Fw(S)550 2401 y Ft(1)570 2394 y Fj(\))12 b(:)g Fl(D)665 2401 y Fk(3)346 2470 y Fu(\001)c(\001)g(\001)75 2546 y Fw(O)q Fj(\()p Fw(S)157 2553 y Ft(1)176 2546 y Fj(\))13 b(:)f Fl(D)272 2553 y Fk(2)336 2546 y Fj(=)-8 b Fu(\))43 b Fw(A)485 2553 y Fv(n)508 2546 y Fj(\()p Fw(S)554 2553 y Ft(1)573 2546 y Fj(\))13 b(:)f Fl(D)669 2553 y Fk(3)75 2621 y Fw(O)q Fj(\()p Fw(S)157 2628 y Ft(1)176 2621 y Fj(\))h(:)f Fl(D)272 2628 y Fk(2)336 2621 y Fj(=)-8 b Fu(\))43 b FG(Null)n Fj(\()p Fw(S)577 2628 y Ft(1)609 2621 y Fj(:)12 b Fl(D)674 2628 y Fk(3)697 2621 y Fj(\))g(:)h Fl(D)793 2628 y Fk(4)952 2793 y FG(11)p eop %%Page: 12 12 12 11 bop 90 12 1761 2 v 90 982 2 970 v 498 922 a @beginspecial @setspecial tx@Dict begin STP newpath 2.6 SLW 0. setgray [ 22.76219 170.71643 204.85973 170.71643 204.85973 34.14328 22.76219 34.14328 /Lineto /lineto load def false Polygon gsave 2.6 SLW 0. setgray 0 setlinecap stroke grestore gsave 1.0 SLW 1. setgray stroke grestore end @endspecial @beginspecial @setspecial tx@Dict begin STP newpath 0.8 SLW 0. setgray [ 45.52438 204.85973 182.09753 204.85973 182.09753 182.09753 45.52438 182.09753 /Lineto /lineto load def false Polygon gsave 1. setgray fill grestore gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore end @endspecial 827 134 a @beginspecial @setspecial tx@Dict begin STP newpath 0.0 SLW 1. setgray 0. true 3.0 neg 3.13687 neg 72.34619 10.36934 .5 Frame gsave 1. setgray fill grestore end @endspecial FG(Prairie)11 b(Rule)h(Set)498 922 y @beginspecial @setspecial tx@Dict begin STP newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { /ArrowBc [ 6 2 roll ] cvx def ArrowBc BeginArrow false 0.4 1.4 2.0 3. Arrow EndArrow } def [ 113.81096 159.33534 113.81096 182.09753 /Lineto /lineto load def false Line gsave 2.0 2 mul CLW add SLW 1. setgray stroke grestore gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore gsave ArrowBc ArrowB pop pop pop pop grestore end @endspecial @beginspecial @setspecial tx@Dict begin STP newpath 2.6 SLW 0. setgray [ 45.52438 159.33534 182.09753 159.33534 182.09753 136.57315 45.52438 136.57315 /Lineto /lineto load def false Polygon gsave 2.6 SLW 0. setgray 0 setlinecap stroke grestore gsave 1.0 SLW 1. setgray stroke grestore end @endspecial 800 318 a(P2V)f(Pre-processor) 498 922 y @beginspecial @setspecial tx@Dict begin STP newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { /ArrowBc [ 6 2 roll ] cvx def ArrowBc BeginArrow false 0.4 1.4 2.0 3. Arrow EndArrow } def [ 113.81096 113.81096 113.81096 136.57315 /Lineto /lineto load def false Line gsave 2.0 2 mul CLW add SLW 1. setgray stroke grestore gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore gsave ArrowBc ArrowB pop pop pop pop grestore end @endspecial @beginspecial @setspecial tx@Dict begin STP newpath 0.8 SLW 0. setgray [ 45.52438 113.81096 182.09753 113.81096 182.09753 91.04877 45.52438 91.04877 /Lineto /lineto load def false Polygon gsave 0.5 setgray fill grestore gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore end @endspecial 813 512 a @beginspecial @setspecial tx@Dict begin STP newpath 0.0 SLW 1. setgray 0. true 3.0 neg 3.13687 neg 78.83955 10.36934 .5 Frame gsave 1. setgray fill grestore end @endspecial(V)-6 b(olcano)11 b(Rule)g(Set)498 922 y @beginspecial @setspecial tx@Dict begin STP newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { /ArrowBc [ 6 2 roll ] cvx def ArrowBc BeginArrow false 0.4 1.4 2.0 3. Arrow EndArrow } def [ 113.81096 68.28658 113.81096 91.04877 /Lineto /lineto load def false Line gsave 2.0 2 mul CLW add SLW 1. setgray stroke grestore gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore gsave ArrowBc ArrowB pop pop pop pop grestore end @endspecial @beginspecial @setspecial tx@Dict begin STP newpath 2.6 SLW 0. setgray [ 45.52438 68.28658 182.09753 68.28658 182.09753 45.52438 45.52438 45.52438 /Lineto /lineto load def false Polygon gsave 2.6 SLW 0. setgray 0 setlinecap stroke grestore gsave 1.0 SLW 1. setgray stroke grestore end @endspecial 702 696 a(V)-6 b(olcano)11 b(Optimizer)g (Generator)498 922 y @beginspecial @setspecial tx@Dict begin STP newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { /ArrowBc [ 6 2 roll ] cvx def ArrowBc BeginArrow false 0.4 1.4 2.0 3. Arrow EndArrow } def [ 113.81096 22.76219 113.81096 45.52438 /Lineto /lineto load def false Line gsave 2.0 2 mul CLW add SLW 1. setgray stroke grestore gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore gsave ArrowBc ArrowB pop pop pop pop grestore end @endspecial @beginspecial @setspecial tx@Dict begin STP newpath 0.8 SLW 0. setgray [ 45.52438 22.76219 182.09753 22.76219 182.09753 0.0 45.52438 0.0 /Lineto /lineto load def false Polygon gsave 0.5 setgray fill grestore gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore end @endspecial 816 885 a @beginspecial @setspecial tx@Dict begin STP newpath 0.0 SLW 1. setgray 0. true 3.0 neg 5.3871 neg 77.5037 10.36934 .5 Frame gsave 1. setgray fill grestore end @endspecial(Query)g(Optimizer)-788 b(Operator)11 b(T)n(ree)498 922 y @beginspecial @setspecial tx@Dict begin STP newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { /ArrowBc [ 6 2 roll ] cvx def ArrowBc BeginArrow false 0.4 1.4 2.0 3. Arrow EndArrow } def [ 45.52438 11.38109 22.76219 11.38109 /Lineto /lineto load def false Line gsave 2.0 2 mul CLW add SLW 1. setgray stroke grestore gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore gsave ArrowBc ArrowB pop pop pop pop grestore end @endspecial @beginspecial @setspecial tx@Dict begin STP newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { /ArrowBc [ 6 2 roll ] cvx def ArrowBc BeginArrow false 0.4 1.4 2.0 3. Arrow EndArrow } def [ 204.85973 11.38109 182.09753 11.38109 /Lineto /lineto load def false Line gsave 2.0 2 mul CLW add SLW 1. setgray stroke grestore gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore gsave ArrowBc ArrowB pop pop pop pop grestore end @endspecial 1349 890 a(Access)g(Plan)p 1850 982 V 90 984 1761 2 v 1850 992 10 974 v 99 992 1761 10 v 75 1095 a(Figure)16 b(8:)26 b(The)17 b(Prairie)f(optimizer)o (-generator)g(paradigm.)32 b(Double-box)o(ed)15 b(modules)h(represent)g (software)75 1157 y(generators,)22 b(shaded)e(box)o(es)g(represent)f (generated)h(programs.)44 b(The)20 b(outermost)f(double-box)o(ed)g (portion)75 1220 y(denotes)10 b(the)h(Prairie)h(optimizer)e(generator)m (.)p 549 1368 852 7 v 549 1419 2 51 v 664 1404 a Fq(Prairie)p 889 1419 V 304 w(V)l(olcano)p 1399 1419 V 549 1425 852 7 v 549 1475 2 51 v 653 1460 a Fz(Operator)p 889 1475 V 292 w(Operator)p 1399 1475 V 549 1477 852 2 v 549 1527 2 51 v 642 1512 a(Algorithm)p 889 1527 V 270 w(Algorithm)p 1399 1527 V 549 1529 852 2 v 549 1579 2 51 v 586 1564 a(Enforcer)o(-operator)p 889 1579 V 273 w(\320)p 1399 1579 V 549 1581 852 2 v 549 1631 2 51 v 576 1616 a(Enforcer)o (-algorithm)p 889 1631 V 216 w(Enforcer)p 1399 1631 V 549 1632 852 2 v 549 1683 2 51 v 587 1668 a(\252Null\272)f(Algorithm)p 889 1683 V 275 w(\320)p 1399 1683 V 549 1684 852 2 v 549 1735 2 51 v 615 1720 a(Operator)g(T)o(ree)p 889 1735 V 175 w(Logical)f(Expression)p 1399 1735 V 549 1736 852 2 v 549 1787 2 51 v 629 1771 a(Access)f(Plan)p 889 1787 V 183 w(Physical)g(Expression)p 1399 1787 V 549 1788 852 2 v 549 1838 2 51 v 636 1872 a(Descriptor)p 889 1838 V 915 1823 a(Operator/Algorithm)j(Ar)o(gument)p 1399 1838 V 890 1840 511 2 v 549 1889 2 51 v 889 1889 V 1013 1874 a(Physical)e(property)p 1399 1889 V 890 1890 511 2 v 549 1939 2 51 v 889 1939 V 1110 1924 a(Cost)p 1399 1939 V 549 1941 852 2 v 549 1991 2 51 v 701 1976 a(\320)p 889 1991 V 281 w(Logical)g(Property)p 1399 1991 V 549 1992 852 2 v 549 2043 2 51 v 701 2028 a(\320)p 889 2043 V 283 w(System)g(Property)p 1399 2043 V 549 2049 852 7 v 427 2125 a FG(T)l(able)j(3:)16 b(Correspondence)11 b(of)g(elements)g(in)f(Prairie)i(and)f(V)-6 b(olcano)75 2305 y(i.e.,)12 b(an)e(operator)g Fw(O)i FG(has)e(algorithms)f Fw(A)725 2312 y Ft(1)756 2305 y FG(through)g Fw(A)942 2312 y Fv(n)966 2305 y FG(,)i(and)f(Null,)g(as)h(implementations.)j (The)d(pre-processor)75 2367 y(classi\256es)k Fw(O)h FG(as)g(an)f FB(enfor)n(cer)o(-oper)o(ator)p FG(,)g(and)g(algorithms)f Fw(A)1096 2374 y Ft(1)1132 2367 y FG(through)g Fw(A)1323 2374 y Fv(n)1362 2367 y FG(as)h FB(enfor)n(cer)o(-algorithms)p FG(.)26 b(An)75 2429 y(e)o(xample)12 b(of)f(an)h(enforcer)o(-operator)f (is)g(the)g(SOR)m(T)h(operator)n(,)f(and)h(an)f(enforcer)o(-algorithm)g (is)g(the)g(Mer)o(ge)p 1793 2429 14 2 v 17 w(sort)75 2491 y(algorithm)e(\(sho)o(wn)g(in)h(T)l(able)g(1\).)17 b(Enforcer)o(-algorithms)9 b(in)g(the)h(Prairie)h(model)f(are)h (translated)e(into)g(enforcers)75 2554 y(in)e(the)g(V)-6 b(olcano)7 b(model;)f(enforcer)o(-operators)h(disappear)g(in)g(V)-6 b(olcano)7 b(when)g(th)o(e)g(P2V)g(pre-processor)g(combi)o(nes)75 2616 y(se)o(v)o(eral)k(I-rules)g(to)g(generate)g(a)h(V)-6 b(olcano)10 b(rule)h(\(this)g(is)f(described)h(in)g(Section)f(3.3\).) 952 2793 y(12)p eop %%Page: 13 13 13 12 bop 137 14 a FG(Another)12 b(major)i(responsibilit)o(y)c(of)j (the)g(P2V)g(pre-processor)g(is)f(classifying)f(dif)o(ferent)i (properties)f(in)g(the)75 77 y(descriptor)m(.)25 b(V)-6 b(olcano)14 b(forces)g(users)g(to)g(classify)f(properties)g(\(as)i (logical,)f(physical,)g(or)g(operator/algorithm)75 139 y(ar)o(guments\))8 b(according)g(to)h(their)f(use.)15 b(The)9 b(classi\256cation)e(of)h(properties)g(helps)g(optimize)f(the)i (performance)g(of)75 201 y(V)-6 b(olcano.)20 b(Unfortunately)m(,)11 b(property)h(classi\256cation)f(is)h(actually)f(rule-dependent.)20 b(That)12 b(is,)g(adding)g(another)75 263 y(rule)f(to)g(a)h(V)-6 b(olcano)10 b(rule)i(set)f(may)g(cause)h(a)g(property)e(that)h(was)f (pre)o(viously)g(considered)g(\252logical\272)h(to)g(become)75 325 y(\252physical\272,)d(or)h(vice)f(v)o(ersa.)16 b(Migrating)7 b(properties)h(between)g(classi\256cations)e(entails)i(a)g (considerable)g(amount)75 387 y(of)g(reprogramming)g(on)g(the)g(user')m (s)g(part,)h(and)f(consequently)e(makes)i(V)-6 b(olcano)7 b(rule)h(sets)g(rather)g(brittle.)14 b(Prairie,)75 449 y(in)h(contrast,)i(does)e(not)g(ask)g(users)h(to)f(make)h(these)f (distinctions;)g(the)g(P2V)h(pre-processor)f(determines)g(the)75 511 y(classi\256cation)e(of)i(properties)f(automatically)f(and)i(thus)f (signi\256cantly)f(facilitates)g(the)h(e)o(xtensibility)e(of)j(rule)75 573 y(sets.)38 b(This)17 b(is)h(done)g(by)g(transforming)f(a)i(single)e (descriptor)g(structure)h(into)f(three)h(parts)g(\(see)h(T)l(able)f (3\):)75 635 y(an)i(operator/algorithm)e(ar)o(gument,)k(physical)d (properties)g(and)g(cost.)42 b(Brie\257y)m(,)23 b(physical)c (properties)g(are)75 698 y(properties)c(that)g(are)i(requested)e(by)h (the)f(user)n(,)j(cost)d(represents)h(an)g(estimate)f(of)h(an)g (algorithm')m(s)f(cost,)i(and)75 760 y(operator/algorithm)d(ar)o (guments)h(are)h(all)f(remaining)h(properties)e(\(including)g (additional)f(properties\).)29 b(The)75 822 y(pre-processor)7 b(achie)o(v)o(es)g(the)g(classi\256cation)g(of)g(prop)o(erties)g(by)f (e)o(xamining)h(t)o(he)g(action)o(s)g(of)g(all)f(rules:)11 b(a)c(property)75 884 y(with)i(a)i(type)f(\252COST\272)h(is)f (classi\256ed)f(as)i(a)f(cost)g(property)m(,)g(properties)f(changed)h (in)g(pre-opt)g(sections)f(of)h(I-rules)75 946 y(\(e.g.,)h(tuple)p 272 946 14 2 v 15 w(order)e(in)f(I-rule)h(\(5\)\))g(are)h(physical)d (properties,)h(and)h(all)g(other)f(properties)g(are)h (operator/algorithm)75 1008 y(ar)o(guments.)137 1070 y(Operator)g(trees)h(and)f(access)g(plans)g(in)g(Prairie)h(correspond)e (to)h(logical)f(and)h(physical)f(e)o(xpressions,)h(respec-)75 1132 y(ti)o(v)o(ely)m(,)h(in)h(V)-6 b(olcano;)10 b(the)h(notations)e (are)j(v)o(ery)g(similar)m(.)75 1263 y Fy(3.2)50 b(Corr)o(espondence)12 b(of)g(rules)75 1355 y Fx(3.2.1)45 b(T)l(-rules)75 1448 y FG(T)l(-rules)7 b(in)g(Prairie)g(are)g(translated)g(to)g(trans)p 763 1448 V 14 w(rules)g(\(transformation)g(rules\))g(in)g(V)-6 b(olcano;)5 b(e)o(xpressions)i(occurring)75 1510 y(on)14 b(either)g(side)g(of)g(a)h(T)l(-rule)f(are)h(transformed)f(into)f(V)-6 b(olcano)14 b(logical)f(e)o(xpressions.)24 b(T)l(able)15 b(4\(a\))f(sho)o(ws)f(the)75 1572 y(correspondence)h(between)f(Prairie) i(T)l(-rules)e(and)h(V)-6 b(olcano)14 b(trans)p 1152 1572 V 15 w(rules.)25 b(The)14 b(join)f(associati)o(vity)f(trans)p 1792 1572 V 15 w(rule)75 1635 y(\(corresponding)e(to)g(the)h(T)l(-rule) g(in)g(Figure)g(3\))g(in)g(V)-6 b(olcano)10 b(is)h(as)g(follo)o(ws)1256 1618 y Ft(6)1274 1635 y FG(:)75 1730 y Fj(\()p FD(JOIN)g(?op)p 256 1730 13 2 v 15 w(ar)o(g5)g Fj(\(\()p FD(JOIN)g(?op)p 552 1730 V 15 w(ar)o(g4)g Fj(\(?1)g(?2\)\))g(?3\)\))41 b Fu(\000)m Fw(>)i Fj(\()p FD(JOIN)11 b(?op)p 1225 1730 V 15 w(ar)o(g7)g Fj(\(?1)g(\()p FD(JOIN)g(?op)p 1576 1730 V 15 w(ar)o(g6)h Fj(\(?2)f(?3\)\)\)\))75 1825 y FG(The)f(pre-test)f(and)h(test)f(portions)g(of)h(a)g(T)l(-rule)g(are)g (mapped)g(to)g(the)g(cond)p 1232 1825 14 2 v 15 w(code)g(\(condition)e (code\))i(of)h(a)f(V)-6 b(olcano)75 1887 y(trans)p 167 1887 V 16 w(rule,)21 b(and)f(the)f(post-test)e(portion)h(is)h(mapped)h (to)f(the)g(appl)p 1194 1887 V 15 w(code)h(\(application)d(code\).)42 b(Ho)o(we)o(v)o(er)n(,)75 1949 y(e)o(xpressions)18 b(in)g(Prairie)i(T)l (-rules)e(can)i(contain)e(enforcer)o(-operators.)40 b(According)18 b(to)h(T)l(able)g(3,)i(enforcer)o(-)75 2011 y(operators)7 b(are)h(deleted)f(by)g(the)h(P2V)f(pre-processor)n(,)i(so)e(T)l(-rules) g(containing)f(enforcer)o(-operators)h(are)h(modi\256ed)75 2074 y(before)g(being)g(translated)f(into)g(V)-6 b(olcano.)15 b(Sometimes,)9 b(this)e(can)h(result)f(in)h(rules)g(that)f(can)i(be)f (further)g(combined)75 2136 y(into)i(one)h(as)g(an)h(optimization)d (measure;)i(this)f(is)h(discussed)f(in)g(Section)h(3.3.)75 2264 y Fx(3.2.2)45 b(I-rules)75 2357 y FG(I-rules)10 b(in)f(Prairie)i(correspond)e(to)h(impl)p 726 2357 V 15 w(rules)g(\(implementation)f(rules\))g(in)h(V)-6 b(olcano;)9 b(the)h(complete)g(relation-)75 2419 y(ship)i(is)h(sho)o(wn)e(in)i(T)l (able)g(4\(b\).)22 b(Ho)o(we)o(v)o(er)n(,)14 b(the)f(transformation)f (is)g(complicated)h(by)f(se)o(v)o(eral)i(factors.)21 b(First,)75 2481 y(Prairie)14 b(adopts)f(a)i(per)o(-rule)f(approach)g (of)g(specifying)f(property)g(transformations,)h(i.e.,)h(properties)e (of)i(algo-)75 2543 y(rithms)9 b(are)i(speci\256ed)f(in)f(an)h(I-rule,) h(whereas)f(V)-6 b(olcano)9 b(adopts)g(a)h(per)o(-algorithm)f(approach) h(where)g(properties)p 75 2584 720 2 v 125 2614 a Fs(6)142 2630 y Fz(There)f(are)g(conditions)f(and)g(actions)g(associated)f(with) j(V)-5 b(olcano)8 b(rules)h(that)g(are)g(not)g(sho)o(wn)f(here.)952 2793 y FG(13)p eop %%Page: 14 14 14 13 bop 212 214 665 7 v 212 264 2 51 v 316 249 a Fq(Prairie)p 530 264 V 211 w(V)l(olcano)p 874 264 V 212 270 665 7 v 212 320 2 51 v 327 305 a Fz(T)m(-rule)p 530 320 V 214 w(trans)p 706 305 12 2 v 13 w(rule)p 874 320 2 51 v 212 322 665 2 v 212 372 2 51 v 305 357 a(Operator)p 530 372 V 199 w(Operator)p 874 372 V 212 374 665 2 v 212 424 2 51 v 238 409 a(Enforcer)o(-operator)p 530 424 V 179 w(\320)p 874 424 V 212 426 665 2 v 212 476 2 51 v 293 461 a(Descriptor)p 530 476 V 106 w(Operator)9 b(Ar)o(gument)p 874 476 V 212 478 665 2 v 212 528 2 51 v 275 513 a(Pre-test)g(code)p 530 528 V 151 w(Cond)p 705 513 12 2 v 12 w(code)p 874 528 2 51 v 212 530 665 2 v 212 580 2 51 v 341 565 a(T)m(est)p 530 580 V 218 w(Cond)p 705 565 12 2 v 12 w(code)p 874 580 2 51 v 212 581 665 2 v 212 632 2 51 v 267 617 a(Post-test)g(code)p 530 632 V 147 w(Appl)p 701 617 12 2 v 13 w(code)p 874 632 2 51 v 212 638 665 7 v 357 742 a(\(a\))h(T)o(ranslation)e(of)h(T)m (-rules)p 1034 58 744 7 v 1034 108 2 51 v 1166 93 a Fq(Prairie)p 1409 108 V 251 w(V)l(olcano)p 1776 108 V 1034 114 744 7 v 1034 165 2 51 v 1181 150 a Fz(I-rule)p 1409 165 V 260 w(impl)p 1593 150 12 2 v 14 w(rule)p 1776 165 2 51 v 1034 166 744 2 v 1034 217 2 51 v 1156 202 a(Operator)p 1409 217 V 238 w(Operator)p 1776 217 V 1034 218 744 2 v 1034 268 2 51 v 1145 253 a(Algorithm)p 1409 268 V 215 w(Algorithm)p 1776 268 V 1034 270 744 2 v 1034 320 2 51 v 1072 305 a(Operator)h(Descriptor)p 1409 320 V 74 w(Operator)f(Ar)o(gument)p 1776 320 V 1034 322 744 2 v 1034 372 2 51 v 1061 357 a(Algorithm)h(Descriptor)p 1409 372 V 51 w(Algorithm)g(Ar)o(gument)p 1776 372 V 1034 374 744 2 v 1034 424 2 51 v 1192 409 a(T)m(est)p 1409 424 V 257 w(Cond)p 1595 409 12 2 v 12 w(code)p 1776 424 2 51 v 1034 426 744 2 v 1034 476 2 51 v 1127 461 a(Pre-opt)g(code)p 1409 476 V 161 w(\252do)p 1537 461 12 2 v 13 w(an)o(y)p 1604 461 V 13 w(good\272)p 1776 476 2 51 v 1034 478 744 2 v 1034 528 2 51 v 1120 513 a(Post-opt)f(code)p 1409 528 V 129 w(\252deri)o(v)o(e)p 1566 513 12 2 v 13 w(phy)p 1636 513 V 12 w(prop\272)p 1776 528 2 51 v 1034 530 744 2 v 1034 580 2 51 v 1204 565 a(\320)p 1409 580 V 305 w(\252cost\272)p 1776 580 V 1034 581 744 2 v 1034 632 2 51 v 1204 617 a(\320)p 1409 632 V 242 w(\252get)p 1548 617 12 2 v 13 w(input)p 1638 617 V 13 w(pv\272)p 1776 632 2 51 v 1034 638 744 7 v 1022 742 a(\(b\))16 b(T)o(ranslation)e(of)i(I-rules.)32 b(Quoted)14 b(strings)h(denote)1022 792 y(helper)9 b(functions.)463 918 y FG(T)l(able)j(4:)j(Correspondence)c(of)g(rules)g(in)g(Prairie)g (and)g(V)-6 b(olcano)75 1090 y(of)14 b(an)g(algorithm)f(are)i (speci\256ed)f(in)g(a)g(helper)g(function)f(for)h(that)g(algorithm.)24 b(W)l(e)15 b(belie)o(v)o(e)f(that)f(the)h(per)o(-rule)75 1152 y(approach)e(is)h(more)g(general)f(and)h(intuiti)o(v)o(e.)19 b(The)12 b(generality)g(arises)g(from)h(the)g(fact)f(that)g(the)h (property)f(trans-)75 1214 y(formations)g(can)i(be)f(dif)o(ferent)g(in) g(dif)o(ferent)f(I-rules)h(for)h(the)f(same)g(algorithm;)g(thus,)g(the) g(per)o(-rule)g(approach)75 1277 y(is)i(a)h(superset)f(of)h(the)g(per)o (-algorithm)f(approach.)30 b(The)16 b(per)o(-rule)g(approach)f(is)g (intuiti)o(v)o(e)f(because)i(property)75 1339 y(mappings)10 b(are)h(made)h(together)e(with)f(the)i(rule)g(in)n(v)o(ocation,)e (instead)h(of)h(a)g(logically)e(disjoint)g(helper)h(function.)137 1401 y(The)j(second)g(complicating)f(factor)h(in)f(V)-6 b(olcano)13 b(in)n(v)o(olv)o(es)f(the)h(reliance)g(on)g(se)o(v)o(eral)g (helper)g(functions)f(to)75 1463 y(achie)o(v)o(e)h(property)f (transformations.)21 b(F)o(or)13 b(instance,)g(using)f(Prairie)h (terminology)m(,)g(a)g(V)-6 b(olcano)12 b(implementa-)75 1525 y(tion)h(rule)i(requires)f(an)g(additional)f(four)h(functions)f (\(called)h(\252do)p 1142 1525 14 2 v 16 w(an)o(y)p 1223 1525 V 17 w(good\272,)h(\252cost\272,)g(\252get)p 1594 1525 V 16 w(input)p 1705 1525 V 15 w(pv\272,)g(and)75 1587 y(\252deri)o(v)o(e)p 210 1587 V 16 w(phy)p 295 1587 V 16 w(prop\272\).)30 b(Although)14 b(the)h(purpose)g(of)h(these)g (functions)e(is)h(purportedly)f(to)i(enhance)g(V)-6 b(olcano)75 1649 y(performance,)12 b(the)o(y)g(add)f(considerable)f(comple)o(xity)g (to)h(the)g(design)f(of)h(rule)g(sets.)17 b(Prairie,)12 b(in)e(contrast,)h(elim-)75 1711 y(inates)i(the)g(need)g(for)h(users)f (to)g(specify)f(these)h(functions,)g(by)g(adopting)f(the)h(per)o(-rule) g(approach)h(of)f(property)75 1773 y(transformations;)i(as)g(sho)o(wn)f (in)h(T)l(able)g(4\(b\),)h(the)f(P2V)g(pre-processor)f(generates)h(two) f(of)h(these)g(functions)75 1835 y(\(\252do)p 159 1835 V 16 w(an)o(y)p 240 1835 V 16 w(good\272)h(and)h(\252deri)o(v)o(e)p 599 1835 V 16 w(phy)p 684 1835 V 15 w(prop\272\))g(automatically)e (from)i(I-rule)f(speci\256cations.)32 b(The)16 b(other)g(two)75 1898 y(helper)11 b(functions)e(are)j(short-circuited,)d(suggesting)g (that)h(the)h(V)-6 b(olcano)10 b(model)h(and)f(implementation)g(is)g (actu-)75 1960 y(ally)h(more)g(complicated)g(than)f(it)h(needs)g(to)g (be.)75 2088 y Fy(3.3)50 b(Rule)12 b(merging)75 2181 y FG(In)7 b(the)h(process)f(of)g(translating)f(Prairie)h (speci\256cations)f(to)h(V)-6 b(olcano,)8 b(se)o(v)o(eral)g (opportunities)t(arise)g(for)f(obtaining)75 2243 y(a)14 b(compact)h(set)f(of)g(rules.)25 b(These)13 b(opportunities)f(arise)i (either)f(because)i(the)e(user)h(speci\256es)g(a)h(non-compact)75 2305 y(set)e(of)f(rules,)i(or)f(because)f(of)h(the)g(translation)e (process)h(itself.)21 b(An)12 b(e)o(xample)i(of)f(the)f(latter)h(case)g (arises)g(when)75 2367 y(enforcer)o(-operators)g(are)h(deleted)e(by)h (the)f(P2V)h(pre-processor)m(.)22 b(Consider)n(,)14 b(for)f(e)o (xample,)h(the)f(follo)o(wing)e(set)75 2429 y(of)g(rules)g(in)g (Prairie:)83 2517 y(JOIN)o Fj(\()p Fw(S)227 2524 y Ft(1)246 2517 y Fw(;)d(S)295 2524 y Ft(2)314 2517 y Fj(\))k(:)h Fl(D)410 2524 y Fk(3)474 2517 y Fj(=)-8 b Fu(\))42 b FG(JOPR)q Fj(\()p FG(SOR)m(T)p Fj(\()p Fw(S)872 2524 y Ft(1)891 2517 y Fj(\))12 b(:)h Fl(D)987 2524 y Fk(4)1009 2517 y Fw(;)8 b FG(SOR)m(T)p Fj(\()p Fw(S)1189 2524 y Ft(2)1208 2517 y Fj(\))k(:)g Fl(D)1303 2524 y Fk(5)1326 2517 y Fj(\))g(:)h Fl(D)1422 2524 y Fk(6)135 2593 y FG(SOR)m(T)q Fj(\()p Fw(S)295 2600 y Ft(1)314 2593 y Fj(\))f(:)h Fl(D)410 2600 y Fk(2)474 2593 y Fj(=)-8 b Fu(\))42 b FG(Null)o Fj(\()p Fw(S)715 2600 y Ft(1)747 2593 y Fj(:)12 b Fl(D)812 2600 y Fk(3)835 2593 y Fj(\))g(:)g Fl(D)930 2600 y Fk(4)75 2669 y FG(JOPR)p Fj(\()p Fw(S)227 2676 y Ft(1)246 2669 y Fw(;)c(S)295 2676 y Ft(2)314 2669 y Fj(\))k(:)h Fl(D)410 2676 y Fk(3)474 2669 y Fj(=)-8 b Fu(\))42 b FG(Nested)p 718 2669 V 16 w(loops)o Fj(\()p Fw(S)876 2676 y Ft(1)907 2669 y Fj(:)13 b Fl(D)973 2676 y Fk(4)995 2669 y Fw(;)8 b(S)1044 2676 y Ft(2)1063 2669 y Fj(\))k(:)h Fl(D)1159 2676 y Fk(5)952 2793 y FG(14)p eop %%Page: 15 15 15 14 bop 75 14 a FG(The)17 b(\256rst)f(rule)h(is)f(a)h(T)l(-rule,)h (and)f(the)f(ne)o(xt)g(two)g(are)h(I-rules.)33 b(Note)17 b(that)f(SOR)m(T)h(is)f(an)h(enforcer)o(-operator)75 77 y(\(because)g(it)f(has)g(a)h(Null)e(implementation\),)i(so)f(it)g (is)g(deleted)g(in)g(the)h(transformation)e(process.)32 b(The)16 b(\256rst)75 139 y(rule)c(then)f(becomes)h(a)g(mapping)f(from) h(one)g(operator)f(JOIN)h(to)f(another)g(JOPR)h(which)f(can)h(be)g(vie) o(wed)f(as)h(an)75 201 y(idempotence)g(mapping;)f(the)h(resulting)f (rule)h(set)g(can)g(be)g(optimized)g(by)f(deleting)g(this)g(idempotent) g(rule)h(and)75 263 y(replacing)f(all)g(occurrences)g(of)h(JOPR)g(with) e(JOIN.)h(Thus,)g(the)g(abo)o(v)o(e)h(set)f(of)h(Prairie)g(rules)f(can) g(be)h(combined)75 325 y(into)e(a)i(single)e(I-rule,)75 420 y(JOIN)o Fj(\()p Fw(S)219 427 y Ft(1)239 420 y Fw(;)e(S)288 427 y Ft(2)307 420 y Fj(\))k(:)g Fl(D)402 427 y Fk(3)437 420 y Fj(=)-8 b Fu(\))14 b FG(Nested)p 653 420 14 2 v 16 w(loops)n Fj(\()p Fw(S)810 427 y Ft(1)842 420 y Fj(:)e Fl(D)907 427 y Fk(4)930 420 y Fw(;)c(S)979 427 y Ft(2)998 420 y Fj(\))k(:)g Fl(D)1093 427 y Fk(5)75 516 y FG(which)e(can)h(then)f (be)g(translated)g(into)f(a)i(V)-6 b(olcano)10 b(impl)p 959 516 V 16 w(rule.)16 b(In)11 b(general,)g(the)f(number)g(of)h(T)l (-rules)f(in)g(a)h(Prairie)75 578 y(rule)g(set)g(is)g(equal)g(to)g(the) g(number)g(of)g(trans)p 776 578 V 16 w(rules)g(in)g(a)h(V)-6 b(olcano)10 b(rule)h(set)g(plus)g(an)g(additional)e(T)l(-rule)i(for)h (each)75 640 y(operator)m(.)235 623 y Ft(7)279 640 y FG(Also,)i(the)f(number)h(of)g(I-rules)g(is)f(the)g(same)i(as)f(the)f (number)h(of)g(impl)p 1432 640 V 15 w(rules)g(plus)e(an)i(additional)75 702 y(I-rule)j(for)f(each)h(enforcer)o(-operator)g(\(for)g(Null)e (implementations,)i(as)f(described)g(in)g(Section)g(2.5\))h(and)f(an)75 764 y(additional)f(I-rule)i(for)g(each)g(enforcer)g(\(since)g (enforcers)g(appear)g(as)g(I-rules)f(in)h(Prairie,)h(instead)e(of)h (being)75 826 y(implicit,)c(as)h(in)e(V)-6 b(olcano\).)23 b(The)14 b(lar)o(ger)f(number)h(of)f(rules)g(represents)g(a)h (conceptual)f(simpli\256cation)e(in)i(rule)75 888 y(writing.)23 b(Ho)o(we)o(v)o(er)n(,)15 b(the)f(P2V)g(pre-processor)f(ensures)g(that) h(the)f(transformation)g(from)h(Prairie)g(to)g(V)-6 b(olcano)75 950 y(always)10 b(produces)g(a)i(compact)f(set)g(of)g(rules.)75 1104 y FC(4)60 b(Experimental)12 b(r)o(esults)75 1213 y FG(This)e(section)g(presents)g(e)o(xperimental)h(results)f(which)g (demonstrate)h(the)f(v)o(alue)h(of)g(Prairie)g(in)g(specifying)e(rule) 75 1275 y(sets)14 b(of)h(rule-based)f(optimizers.)26 b(Our)15 b(e)o(xperiments)f(consist)f(of)i(specifying)e(rule-based)i (optimizers)f(using)75 1337 y(Prairie)9 b(and)f(generating)f (optimizers)h(using)f(the)h(P2V)g(pre-processor)g(and)h(the)f (optimizer)o(-generator)f(paradigm)75 1400 y(of)k(Figure)g(8.)137 1462 y(In)g([5],)g(we)g(presented)f(an)h(implementation)f(of)g(a)i (centralized)e(relational)f(query)i(optimizer)f(using)f(Prairie.)75 1524 y(Using)i(the)g(P2V)h(translator)n(,)g(we)g(translated)f(this)f (to)i(V)-6 b(olcano)11 b(format)h(and)g(optimized)f(se)o(v)o(eral)h (queries)g(using)75 1586 y(the)j(resultant)f(optimizer)m(.)28 b(F)o(or)16 b(comparison,)f(we)g(hand-coded)g(the)g(same)g(optimizer)g (directly)f(in)h(V)-6 b(olcano.)75 1648 y(The)10 b(results)f(presented) h(there)g(sho)o(wed)f(that,)h(using)f(Prairie)h(\(compared)h(to)e (directly)h(using)e(V)-6 b(olcano\))10 b(resulted)75 1710 y(in)16 b(approximately)f(50\045)i(sa)o(vings)e(in)h(lines)f(of)i (code)g(with)e(ne)o(gligible)g(\(less)h(than)g(5\045\))h(increase)f(in) h(query)75 1772 y(optimization)c(time.)29 b(Ho)o(we)o(v)o(er)n(,)16 b(the)f(optimizer)f(was)h(quite)f(small)h(in)g(terms)g(of)g(the)g (number)g(of)h(operators,)75 1834 y(algorithms)10 b(and)h(rules.)137 1896 y(F)o(or)h(a)g(more)f(realistic)g(e)o(v)o(aluation)e(of)i (Prairie,)h(we)g(needed)f(answers)f(to)h(the)g(follo)o(wing)e (questions:)124 1992 y(1.)21 b(Is)11 b(Prairie)h(adequate)e(for)i(lar)o (ge-scale)f(rule)g(sets?)124 2087 y(2.)21 b(Ho)o(w)10 b(is)h(programmer)h(producti)o(vity)d(enhanced)i(by)f(the)h(high-le)o (v)o(el)f(abstractions)g(of)h(Prairie?)124 2182 y(3.)21 b(Can)11 b(Prairie)h(rule)f(sets)g(be)g(translated)f(automatically)g (into)g(ef)o(\256cient)h(implementations?)137 2278 y(W)l(e)16 b(addressed)e(the)g(\256rst)h(question)e(by)i(using)e(the)i(T)m(e)o (xas)f(Instruments)g(Open)h(OODB)f(query)h(optimizer)75 2340 y(rule)g(set,)h(which)e(has)h(the)g(lar)o(gest)f(publicly)g(a)o(v) o(ailable)g(rule)h(set.)27 b(W)l(e)16 b(describe)f(this)f(optimizer)g (in)h(the)f(ne)o(xt)75 2402 y(section,)c(and)h(then)g(gi)o(v)o(e)g(our) g(assessments)f(to)h(the)g(last)f(two)g(questions)f(in)i(subsequent)e (sections.)p 75 2442 720 2 v 125 2472 a Fs(7)142 2488 y Fz(This)g(is)g(to)h(introduce)e(enforcer)o(-operators)h(in)g(e)o (xpressions,)e(as)i(mentioned)f(in)h(footnote)g(5.)952 2793 y FG(15)p eop %%Page: 16 16 16 15 bop 75 14 a Fy(4.1)50 b(The)13 b(T)-5 b(exas)13 b(Instruments)g(Open)e(OODB)h(query)g(optimizer)75 107 y FG(The)i(T)m(e)o(xas)g(Instruments)f(Open)h(Object-Oriented)e (Database)i(Management)h(System)f([19])g(is)g(an)g(open,)h(e)o(x-)75 169 y(tensible,)f(object-oriented)f(database)h(system)g(which)g(pro)o (vides)g(users)g(an)g(architectural)g(frame)o(work)h(that)f(is)75 231 y(con\256gurable)g(in)g(an)g(incremental)g(manner)m(.)27 b(It)14 b(consists)f(of)h(three)g(sets)g(of)g(modules:)22 b(a)14 b(core)h(set)f(pro)o(viding)75 294 y(lo)o(w-le)o(v)o(el)e (primiti)o(v)o(es)f(for)i(creating)g(ne)o(w)f(en)n(vironments,)g(a)i (set)e(of)h(functional)e(modules)h(that)g(facilitates)g(e)o(x-)75 356 y(tensibility)d(using)i(functional)f(requirements,)j(and)f(a)g (meta-architecture)g(module)g(housing)e(the)i(e)o(xtensibility)75 418 y(concepts)f(of)h(Open)f(OODB.)h(Examples)f(of)h(the)f(core)h(set)f (are)i(communication)d(and)i(address)f(space)h(manage-)75 480 y(ment,)f(while)e(e)o(xamples)h(of)f(functional)g(modules)g(are)h (persistence,)g(distrib)o(ution)c(and)k(query)g(processing.)k(The)75 542 y(meta-architecture)d(module)g(consists)e(of)j(e)o(v)o(ents,)f (sentries,)f(and)h(polic)o(y)g(manager)g(interfaces.)137 604 y(The)g(query)g(processing)e(module)i(pro)o(vides)f(users)g(with)g (a)h(query)g(language)f(\(OQL[C++]\))h(based)g(on)f(SQL)75 666 y(and)f(C++.)16 b(A)9 b(query)f(e)o(xpressed)h(in)g(this)f(high-le) o(v)o(el)f(format)j(is)e(parsed)h(and)g(transformed)g(into)f(an)h (operator)g(tree)75 728 y(suitable)h(for)i(optimization.)17 b(The)12 b(query)f(optimizer)h(generates)f(an)h(optimal)f(access)h (plan)f(from)i(this)e(operator)75 790 y(tree)g(which)g(is)g(then)f (transformed)h(into)f(a)i(C++)f(program)g(ready)h(for)f(e)o(x)o (ecution.)137 852 y(The)h(query)f(optimizer)g(in)h(the)f(Open)g(OODB)h ([2])g(is)f(generated)h(using)e(V)-6 b(olcano.)17 b(It)12 b(is)f(written)g(as)h(a)g(set)f(of)75 915 y(trans)p 167 915 14 2 v 16 w(rules)g(and)h(impl)p 445 915 V 16 w(rules)f(that)g (de\256ne)i(the)e(algebra)h(of)g(an)g(object-oriented)e(database)i (system.)18 b(Currently)m(,)75 977 y(there)9 b(are)h(17)e (transformation)g(rules)g(and)h(9)g(implementation)e(rules)i(together)f (with)g(about)g Fj(13000)f FG(lines)h(of)h(code)75 1039 y(for)14 b(support)f(functions;)g(this,)h(of)g(course,)g(can)h(be)f (changed)f(by)h(an)g(Open)f(OODB)h(user)g(for)g(speci\256c)g(needs.)75 1101 y(There)c(are)h(also)e FB(catalogs)f FG(which)h(contain)g (information)g(about)g(base)h(classes)g(that)f(are)i(used)f(by)f(the)h (optimizer)m(.)75 1231 y Fy(4.2)50 b(Pr)o(ogrammer)14 b(pr)o(oductivity)75 1324 y FG(Programmer)e(producti)o(vity)c(can)j(be) g(measured)g(in)g(dif)o(ferent)f(ways.)15 b(An)c(admittedly)e (simplistic)g(metric)i(is)f(the)75 1386 y(number)i(of)f(lines)g(of)g (code)h(that)f(must)g(be)h(written.)k(But)c(there)f(are)h(also)f(less)g (tangible)g(measures,)h(such)f(as)g(the)75 1448 y(amount)i(of)g (conceptual)g(ef)o(fort)g(needed)h(to)e(understand)g(a)i(particular)f (programming)g(task.)23 b(Our)13 b(e)o(xperience)75 1510 y(with)k(the)g(Open)g(OODB)h(query)g(optimizer)f(suggests)f(that)h (Prairie)h(e)o(xcels)g(on)f(the)g(latter)n(,)j(while)d(of)o(fering)75 1572 y(modest)11 b(reductions)e(in)i(the)g(v)o(olume)g(of)g(code)g (that)g(needs)g(to)f(be)i(written.)137 1635 y(W)l(e)e(con)n(v)o(erted)g (by)f(hand)g(the)g(Open)h(OODB)f(query)g(optimizer')m(s)h(V)-6 b(olcano)8 b(speci\256cations)h(to)g(Prairie.)16 b(This)75 1697 y(was)d(a)h(non-tri)o(vial)d(task)i(because)g(of)h(the)f(relati)o (v)o(ely)f(lar)o(ge)i(size)f(of)h(the)f(rule)g(set)g(and)g(the)h (comple)o(xity)e(of)h(the)75 1759 y(support)7 b(functions.)15 b(This)7 b(was)i(where)g(we)g(found)f(Prairie)h(helped)f(in)h (conceptually)e(simplifying)f(the)j(rules)f(and)75 1821 y(actions.)16 b(W)l(e)c(then)f(used)f(our)h(P2V)h(pre-processor)f(to)f (reconstitute)g(these)h(Prairie)h(speci\256cations)e(as)h(V)-6 b(olcano)75 1883 y(speci\256cations.)18 b(As)12 b(described)f(in)h (Section)f(3,)i(this)e(process)g(in)n(v)o(olv)o(ed)g(a)i(considerable)e (le)o(v)o(el)h(of)g(comple)o(xity)m(,)75 1945 y(partly)j(because)h(the) f(Prairie)h(speci\256cation)f(had)g(22)h(T)l(-rules)f(and)g(11)h (I-rules)f(compared)h(to)g(17)f(trans)p 1774 1945 V 16 w(rules)75 2007 y(and)d(9)g(impl)p 275 2007 V 16 w(rules)f(in)h(the)f (V)-6 b(olcano)12 b(speci\256cation;)f(the)h(reconstituted)e(V)-6 b(olcano)11 b(speci\256cation)g(had)h(the)g(same)75 2069 y(number)f(of)g(trans)p 366 2069 V 16 w(rules)g(and)g(impl)p 643 2069 V 16 w(rules)f(as)i(the)e(original)g(hand-coded)h (speci\256cation.)137 2131 y(Con)n(v)o(erting)i(the)h(Open)f(OODB)g (optimizer)g(rule)h(set)f(into)g(Prairie)h(format)g(actually)f (simpli\256ed)f(its)h(spec-)75 2193 y(i\256cation)g(as)i(the)e(comple)o (xities)g(of)i(the)f(V)-6 b(olcano)13 b(model)h(were)h(remo)o(v)o(ed.) 26 b(The)14 b(reduction)f(in)h(lines)f(of)h(code)75 2256 y(was)e(modest)f(\320)i(there)f(was)g(about)f(a)i(10\045)e(sa)o(vings.) 934 2239 y Ft(8)972 2256 y FG(Ho)o(we)o(v)o(er)n(,)i(as)f(mentioned)f (abo)o(v)o(e,)i(sa)o(vings)e(in)h(lines)f(of)75 2318 y(code)k(do)f(not)f(adequately)h(re\257ect)h(increases)g(in)f (programmer)h(producti)o(vity)m(.)24 b(W)l(e)15 b(found)f(the)g (encapsulated)75 2380 y(speci\256cations)7 b(of)i(Prairie)g(\320)g (namely)m(,)h(the)e(use)g(of)h(a)g(single)e(descriptor)h(and)g(fe)o (wer)h(e)o(xplicit)f(support)f(functions)75 2442 y(\320)12 b(made)g(rule)f(programming)f FB(muc)o(h)i FG(easier)m(.)p 75 2482 720 2 v 125 2509 a Fs(8)142 2525 y Fz(The)d(original)g(V)-5 b(olcano)8 b(speci\256cation)f(had)i(13400)e(lines,)i(the)g(Prairie)h (speci\256cation)d(had)i(12100)e(lines,)i(and)g(the)g(P2V)l(-generated) 75 2575 y(V)-5 b(olcano)8 b(speci\256cation)f(had)i(15800)e(lines.)952 2793 y FG(16)p eop %%Page: 17 17 17 16 bop 75 14 a Fy(4.3)50 b(P)o(erf)o(ormance)13 b(r)o(esults)g (using)f(the)f(Open)h(OODB)g(optimizer)75 107 y FG(The)d(acid)g(test)g (of)g(Prairie)h(was)f(whether)g(Prairie)g(speci\256cations)f(could)h (be)g(translated)f(into)g(ef)o(\256cient)i(optimizer)75 169 y(implementations.)k(Our)7 b(e)o(xperiments)g(using)f(the)h(Open)g (OODB)h(consisted)d(of)j(optimizing)d(8)j(dif)o(ferent)f(queries)75 231 y(using)j(the)h(two)f(query)h(optimizers)f(generated,)h(respecti)o (v)o(ely)m(,)g(using)f(Prairie)h(and)g(using)f(V)-6 b(olcano)10 b(directly)g(\(in)75 294 y(the)h(remainder)g(of)g(this)f(section,)g(we) i(will)e(use)g(\252Prairie\272)i(and)f(\252V)-6 b(olcano\272)11 b(to)f(denote)h(these)f(two)g(approaches\).)75 356 y(There)k(were)h(4)f (distinct)e(e)o(xpressions)g(that)i(were)g(used)g(to)g(generate)g(the)f (queries)h(used)g(in)f(the)h(e)o(xperiments;)75 418 y(these)d(are)h (sho)o(wn)e(in)g(Figure)h(9.)17 b(Each)11 b(e)o(xpression)f(represents) h(an)g Fw(N)5 b FG(-way)10 b(join)g(query)h(for)h(v)o(arying)e Fw(N)5 b FG(.)137 480 y(The)15 b(\256rst)f(e)o(xpression)g(E1)g(is)g(a) h(simple)f(retrie)o(v)o(al)g(and)g(join)g(of)h(base)f(classes.)26 b(The)15 b(second,)g(E2,)h(is)e(also)75 542 y(a)h(join)e(of)h(base)g (classes;)h(ho)o(we)o(v)o(er)n(,)g(after)g(each)g(class)f(retrie)o(v)o (al,)g(an)h(attrib)o(ute)e(has)h(to)g(be)g(materialized)g(\(i.e.,)75 604 y(brought)e(into)h(vie)o(w\))g(before)h(the)g(join.)23 b(The)14 b(third)f(and)g(fourth)h(e)o(xpressions)e(\(E3)i(and)f(E4\))h (are)g(the)g(same)g(as)75 666 y(the)d(\256rst)g(and)f(second)h(\(E1)f (and)h(E2\))g(respecti)o(v)o(ely)m(,)f(e)o(xcept)h(that)g(there)g(is)f (a)i(selection)d(of)i(attrib)o(utes)f(\(the)h(select)75 728 y(operator)g(is)f(the)h(root)g(of)g(the)g(e)o(xpressions\).)786 712 y Ft(9)137 790 y FG(The)i(algebra)h(that)f(was)f(used)h(in)g(the)g (Prairie)h(and)f(V)-6 b(olcano)13 b(optimizers)f(for)i(our)f(e)o (xperiments)g(consisted)75 852 y(of)f(5)g(relational)f(operators)h (SELECT)m(,)g(PR)n(OJECT)m(,)g(JOIN,)g(RET)h(and)f(UNNEST)f(\(for)i (set-v)o(alued)e(attrib)o(utes\))75 915 y(and)g(an)g(object-oriented)e (operator)h(called)h(MA)-5 b(T)11 b(\(for)g(MA)-5 b(T)m(erialize;)11 b(it)f(is)g(fundamentally)g(a)h(pointer)o(-chasing)75 977 y(operator)g(for)g(attrib)o(utes)f(of)h(a)h(class\).)k(There)11 b(were)h(8)f(algorithms.)137 1039 y(There)16 b(are)h(man)o(y)f (parameters)h(that)e(can)h(be)g(v)o(aried)g(when)f(benchmarking)g(a)i (query)e(optimizer)m(.)31 b(Since)75 1101 y(our)12 b(objecti)o(v)o(e)f (was)h(to)g(v)o(erify)g(that)f(the)h(Prairie)h(approach)f(did)f(not)h (sacri\256ce)h(ef)o(\256cienc)o(y)m(,)g(our)f(criteria)g(for)g(the)75 1163 y(queries)e(was)g(that)g(the)o(y)g(test)g(a)h(majority)e(of)i(the) f(rules,)h(with)e(v)o(arying)g(properties)h(of)g(the)h(base)f(classes.) 16 b(T)l(o)10 b(this)75 1225 y(end,)g(we)f(tested)f(our)h(optimizer)f (\(and)h(the)g(V)-6 b(olcano)9 b(optimizer\))f(with)g(8)h(dif)o(ferent) g(queries)f(\(sho)o(wn)g(in)h(T)l(able)g(5\).)75 1287 y(The)k(eight)e(queries)h(Q1)h(through)e(Q8)i(are)g(deri)o(v)o(ed)f (from)i(the)e(4)h(e)o(xpressions)e(in)h(Figure)h(9.)21 b(Each)12 b(e)o(xpression)75 1349 y(E1)f(through)g(E4)g(is)g(used)g(to) h(obtain)e(two)h(queries)g(for)h(a)g(\256x)o(ed)g(number)g Fw(N)k FG(of)c(JOINs)f(in)g(the)g(e)o(xpression.)17 b(The)75 1411 y(only)12 b(dif)o(ference)i(between)f(the)g(two)f(queries)h (obtained)f(from)i(an)g(e)o(xpression)e(is)h(that)f(the)i(\256rst)f (one)g(does)g(not)75 1473 y(contain)8 b(an)o(y)g(indices)g(on)g(an)o(y) h(classes,)g(whereas)f(the)h(second)f(one)g(contains)f(a)i(single)f (inde)o(x)g(on)g(each)h(base)g(class)75 1536 y(occurring)j(in)g(the)g (e)o(xpression.)19 b(In)12 b(e)o(xpressions)f(where)i(a)f(SELECT)h(is)e (present)h(\(E3)g(and)h(E4\),)f(the)g(selection)75 1598 y(predicate)e(is)f(a)h(conjunction)e(of)i(equality)f(predicates)g FB(bc)989 1605 y Fv(i)1016 1598 y Fj(==)k FB(const)1195 1605 y Fv(i)1209 1598 y FG(,)e(where)f FB(bc)1395 1605 y Fv(i)1419 1598 y FG(is)f(an)h(attrib)o(ute)f(of)h(class)f FB(C)1850 1605 y Fv(i)1864 1598 y FG(,)75 1660 y(and)j FB(const)249 1667 y Fv(i)276 1660 y FG(is)g(a)h(constant)e(\(we)h (arbitrarily)g(set)g(this)f(to)h Fw(i)p FG(,)h(because)f(its)g(v)o (alue)g(doesn')o(t)f(af)o(fect)i(the)g(correctness)75 1722 y(or)g(performance)g(of)g(the)f(optimizer\).)20 b(In)13 b(addition,)e(for)i(queries)f(with)g(a)h(SELECT)f(and)g(whose)g (base)h(classes)75 1784 y(ha)o(v)o(e)j(indices)e(\(Q6)h(and)g(Q8)g(in)g (T)l(able)h(5\),)g(the)f(\(single\))g(inde)o(x)g(of)g(each)h(base)f (class)g(was)f(chosen)h(to)g(be)g(the)75 1846 y(attrib)o(ute)8 b(referenced)j(in)e(the)g(selection)g(predicate.)15 b(F)o(or)c(e)o (xample,)f(class)g FB(C)1288 1853 y Fv(i)1312 1846 y FG(was)f(chosen)g(to)g(ha)o(v)o(e)h(an)f(inde)o(x)h(on)75 1908 y(attrib)o(ute)h FB(bc)281 1915 y Fv(i)295 1908 y FG(.)21 b(The)12 b(join)f(predicates)h(for)h(each)g(JOIN)f(were)h (chosen)f(at)g(random,)h(and)g(were)g(always)e(equality)75 1970 y(predicates.)23 b(The)13 b(choice)g(of)g(JOIN)g(predicates)g(was) g(such)g(that)f(the)h(queries)g(corresponded)g(to)f(linear)h(query)75 2032 y(graphs.)j(In)11 b(the)g(future,)g(we)h(will)e(e)o(xperiment)h (with)f(non-linear)g(\(e.g.,)j(star\))e(query)g(graphs.)137 2094 y(T)l(able)e(5)g(also)g(sho)o(ws)f(the)g(number)i(of)f(trans)p 835 2094 14 2 v 15 w(rules)g(and)g(impl)p 1107 2094 V 16 w(rules)f(that)h(are)g(matched)h(by)e(each)i(e)o(xpression.)75 2157 y(These)i(are)i(the)e(rules)g(whose)g(left)g(hand)g(sides)g(match) h(a)g(sub-e)o(xpression.)19 b(Ho)o(we)o(v)o(er)n(,)13 b(not)f(all)g(the)h(rules)f(were)75 2219 y(necessarily)7 b(applicable.)14 b(F)o(or)8 b(instance,)g(an)g(impl)p 875 2219 V 16 w(rule)f(with)g(an)g(inde)o(x)g(scan)h(would)e(not)h (apply)f(to)i(Q3,)g(although)75 2281 y(it)j(might)f(apply)g(to)h(Q4.) 137 2343 y(Queries)g(Q1)g(through)f(Q8)h(were)h(optimized)e(for)h (increasing)f(number)i Fw(N)k FG(of)11 b(JOINs.)16 b(F)o(or)c(a)f (\256x)o(ed)h(number)p 75 2383 720 2 v 125 2410 a Fs(9)142 2426 y Fz(The)c(most)g(comple)o(x)g(e)o(xpression)e(E4)i(consists)f(of) i(all)g(operators)e(in)i(the)f(algebra,)g(e)o(xcept)f(PR)o(OJECT)g(and) g(UNNEST)m(.)i(PR)o(OJECT)75 2476 y(was)e(not)h(considered)f(because)f (it)j(appeared)d(in)j(only)f(one)f(impl)p 912 2476 12 2 v 14 w(rule)i(and)e(no)h(trans)p 1174 2476 V 13 w(rules,)h(and)e (thus,)i(would)e(not)h(af)o(fect)h(the)f(size)g(of)g(the)75 2527 y(search)g(space)f(of)i(abstract)f(e)o(xpressions.)k(UNNEST)c(was) g(not)h(considered)e(because)g(it)j(appeared)d(in)i(e)o(xactly)f(one)h (trans)p 1680 2527 V 13 w(rule)g(and)f(one)75 2577 y(impl)p 145 2577 V 14 w(rule;)i(including)e(it)i(in)f(our)g(queries)f(would)g (ha)o(v)o(e)g(increased)g(the)g(number)h(of)g(parameters)f(that)h (could)f(af)o(fect)h(our)g(run-times.)14 b(W)m(e)75 2627 y(preferred)9 b(to)h(concentrate)d(on)i(simple)g(JOIN)g(e)o (xpressions.)952 2793 y FG(17)p eop %%Page: 18 18 18 17 bop 90 12 1761 2 v 90 655 2 644 v 164 500 a tx@Dict begin tx@NodeDict begin { } /TheNodecl1 16 { .5 5.40799 1.1111 false .5 9.50261 InitRnode } NewNode end end 164 500 a Fb(C)186 505 y Fs(1)152 431 y tx@Dict begin tx@NodeDict begin { } /TheNodegetcl1 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 152 431 a Fo(RET)183 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecl1 /TheNodegetcl1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 183 491 a 305 500 a tx@Dict begin tx@NodeDict begin { } /TheNodecl2 16 { .5 5.40799 1.1111 false .5 9.50261 InitRnode } NewNode end end 305 500 a Fb(C)328 505 y Fs(2)294 431 y tx@Dict begin tx@NodeDict begin { } /TheNodegetcl2 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 294 431 a Fo(RET)183 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecl2 /TheNodegetcl2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 183 491 a 218 360 a tx@Dict begin tx@NodeDict begin { } /TheNodejoingetcl1getcl2 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 218 360 a Fo(JOIN)183 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoingetcl1getcl2 /TheNodegetcl1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 183 491 a 183 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoingetcl1getcl2 /TheNodegetcl2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 183 491 a 325 279 a tx@Dict begin 45. Rot end 325 279 a 304 281 a tx@Dict begin tx@NodeDict begin { } /TheNodedots 16 { .5 0.88889 0.0 false .5 9.91681 InitRnode } NewNode end end 304 281 a Fv(:)6 b(:)g(:)325 279 y tx@Dict begin 45. neg Rot end 325 279 a 183 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoingetcl1getcl2 /TheNodedots InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 183 491 a 436 290 a tx@Dict begin tx@NodeDict begin { } /TheNodegetcln 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 436 290 a Fo(RET)445 359 y tx@Dict begin tx@NodeDict begin { } /TheNodecln 16 { .5 5.40799 1.0 false .5 10.45403 InitRnode } NewNode end end 445 359 a Fb(C)467 363 y Fh(n)183 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecln /TheNodegetcln InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 183 491 a 360 219 a tx@Dict begin tx@NodeDict begin { } /TheNoderoot 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 360 219 a Fo(JOIN)183 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderoot /TheNodedots InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 183 491 a 183 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderoot /TheNodegetcln InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 183 491 a 279 595 a Fz(\(a\))k(E1)p 545 643 2 619 v 594 500 a tx@Dict begin tx@NodeDict begin { } /TheNodecl1 16 { .5 5.40799 1.1111 false .5 9.50261 InitRnode } NewNode end end 594 500 a Fb(C)616 505 y Fs(1)583 431 y tx@Dict begin tx@NodeDict begin { } /TheNodegetcl1 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 583 431 a Fo(RET)614 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecl1 /TheNodegetcl1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 736 500 a tx@Dict begin tx@NodeDict begin { } /TheNodecl2 16 { .5 5.40799 1.1111 false .5 9.50261 InitRnode } NewNode end end 736 500 a Fb(C)758 505 y Fs(2)724 431 y tx@Dict begin tx@NodeDict begin { } /TheNodegetcl2 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 724 431 a Fo(RET)614 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecl2 /TheNodegetcl2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 579 361 a tx@Dict begin tx@NodeDict begin { } /TheNodematgetcl1 16 { .5 5.384 0.0 false .5 16.888 InitRnode } NewNode end end 579 361 a Fo(MA)l(T)614 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodegetcl1 /TheNodematgetcl1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 721 361 a tx@Dict begin tx@NodeDict begin { } /TheNodematgetcl2 16 { .5 5.384 0.0 false .5 16.888 InitRnode } NewNode end end 721 361 a Fo(MA)l(T)614 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodegetcl2 /TheNodematgetcl2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 649 289 a tx@Dict begin tx@NodeDict begin { } /TheNodejoinmatgetcl1matgetcl2 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 649 289 a Fo(JOIN)614 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinmatgetcl1matgetcl2 /TheNodematgetcl1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 614 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinmatgetcl1matgetcl2 /TheNodematgetcl2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 756 208 a tx@Dict begin 45. Rot end 756 208 a 735 210 a tx@Dict begin tx@NodeDict begin { } /TheNodedots 16 { .5 0.88889 0.0 false .5 9.91681 InitRnode } NewNode end end 735 210 a Fv(:)c(:)f(:)756 208 y tx@Dict begin 45. neg Rot end 756 208 a 614 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinmatgetcl1matgetcl2 /TheNodedots InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 866 290 a tx@Dict begin tx@NodeDict begin { } /TheNodegetcln 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 866 290 a Fo(RET)876 359 y tx@Dict begin tx@NodeDict begin { } /TheNodecln 16 { .5 5.40799 1.0 false .5 10.45403 InitRnode } NewNode end end 876 359 a Fb(C)898 363 y Fh(n)614 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecln /TheNodegetcln InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 862 219 a tx@Dict begin tx@NodeDict begin { } /TheNodematgetcln 16 { .5 5.384 0.0 false .5 16.888 InitRnode } NewNode end end 862 219 a Fo(MA)l(T)614 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodematgetcln /TheNodegetcln InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 791 148 a tx@Dict begin tx@NodeDict begin { } /TheNoderoot 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 791 148 a Fo(JOIN)614 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderoot /TheNodedots InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 614 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderoot /TheNodematgetcln InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 614 491 a 708 595 a Fz(\(b\))10 b(E2)p 975 643 2 619 v 1025 500 a tx@Dict begin tx@NodeDict begin { } /TheNodecl1 16 { .5 5.40799 1.1111 false .5 9.50261 InitRnode } NewNode end end 1025 500 a Fb(C)1047 505 y Fs(1)1013 431 y tx@Dict begin tx@NodeDict begin { } /TheNodegetcl1 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1013 431 a Fo(RET)1044 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecl1 /TheNodegetcl1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1044 491 a 1166 500 a tx@Dict begin tx@NodeDict begin { } /TheNodecl2 16 { .5 5.40799 1.1111 false .5 9.50261 InitRnode } NewNode end end 1166 500 a Fb(C)1188 505 y Fs(2)1155 431 y tx@Dict begin tx@NodeDict begin { } /TheNodegetcl2 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1155 431 a Fo(RET)1044 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecl2 /TheNodegetcl2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1044 491 a 1079 360 a tx@Dict begin tx@NodeDict begin { } /TheNodejoingetcl1getcl2 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 1079 360 a Fo(JOIN)1044 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoingetcl1getcl2 /TheNodegetcl1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1044 491 a 1044 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoingetcl1getcl2 /TheNodegetcl2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1044 491 a 1186 279 a tx@Dict begin 45. Rot end 1186 279 a 1165 281 a tx@Dict begin tx@NodeDict begin { } /TheNodedots 16 { .5 0.88889 0.0 false .5 9.91681 InitRnode } NewNode end end 1165 281 a Fv(:)c(:)g(:)1186 279 y tx@Dict begin 45. neg Rot end 1186 279 a 1044 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoingetcl1getcl2 /TheNodedots InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1044 491 a 1296 290 a tx@Dict begin tx@NodeDict begin { } /TheNodegetcln 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1296 290 a Fo(RET)1306 359 y tx@Dict begin tx@NodeDict begin { } /TheNodecln 16 { .5 5.40799 1.0 false .5 10.45403 InitRnode } NewNode end end 1306 359 a Fb(C)1328 363 y Fh(n)1044 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecln /TheNodegetcln InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1044 491 a 1221 219 a tx@Dict begin tx@NodeDict begin { } /TheNoderoot 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 1221 219 a Fo(JOIN)1044 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderoot /TheNodedots InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1044 491 a 1044 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderoot /TheNodegetcln InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1044 491 a 1196 148 a tx@Dict begin tx@NodeDict begin { } /TheNodeselect 16 { .5 5.384 0.09999 false .5 29.336 InitRnode } NewNode end end 1196 148 a Fo(SELECT)1044 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodeselect /TheNoderoot InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1044 491 a 1140 595 a Fz(\(c\))k(E3)p 1405 643 2 619 v 1455 500 a tx@Dict begin tx@NodeDict begin { } /TheNodecl1 16 { .5 5.40799 1.1111 false .5 9.50261 InitRnode } NewNode end end 1455 500 a Fb(C)1477 505 y Fs(1)1443 431 y tx@Dict begin tx@NodeDict begin { } /TheNodegetcl1 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1443 431 a Fo(RET)1475 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecl1 /TheNodegetcl1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1597 500 a tx@Dict begin tx@NodeDict begin { } /TheNodecl2 16 { .5 5.40799 1.1111 false .5 9.50261 InitRnode } NewNode end end 1597 500 a Fb(C)1619 505 y Fs(2)1585 431 y tx@Dict begin tx@NodeDict begin { } /TheNodegetcl2 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1585 431 a Fo(RET)1475 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecl2 /TheNodegetcl2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1440 361 a tx@Dict begin tx@NodeDict begin { } /TheNodematgetcl1 16 { .5 5.384 0.0 false .5 16.888 InitRnode } NewNode end end 1440 361 a Fo(MA)l(T)1475 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodegetcl1 /TheNodematgetcl1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1581 361 a tx@Dict begin tx@NodeDict begin { } /TheNodematgetcl2 16 { .5 5.384 0.0 false .5 16.888 InitRnode } NewNode end end 1581 361 a Fo(MA)l(T)1475 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodegetcl2 /TheNodematgetcl2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1510 289 a tx@Dict begin tx@NodeDict begin { } /TheNodejoinmatgetcl1matgetcl2 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 1510 289 a Fo(JOIN)1475 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinmatgetcl1matgetcl2 /TheNodematgetcl1 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1475 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinmatgetcl1matgetcl2 /TheNodematgetcl2 InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1616 208 a tx@Dict begin 45. Rot end 1616 208 a 1595 210 a tx@Dict begin tx@NodeDict begin { } /TheNodedots 16 { .5 0.88889 0.0 false .5 9.91681 InitRnode } NewNode end end 1595 210 a Fv(:)d(:)e(:)1616 208 y tx@Dict begin 45. neg Rot end 1616 208 a 1475 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodejoinmatgetcl1matgetcl2 /TheNodedots InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1727 290 a tx@Dict begin tx@NodeDict begin { } /TheNodegetcln 16 { .5 5.384 0.0 false .5 15.112 InitRnode } NewNode end end 1727 290 a Fo(RET)1737 359 y tx@Dict begin tx@NodeDict begin { } /TheNodecln 16 { .5 5.40799 1.0 false .5 10.45403 InitRnode } NewNode end end 1737 359 a Fb(C)1759 363 y Fh(n)1475 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodecln /TheNodegetcln InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1723 219 a tx@Dict begin tx@NodeDict begin { } /TheNodematgetcln 16 { .5 5.384 0.0 false .5 16.888 InitRnode } NewNode end end 1723 219 a Fo(MA)l(T)1475 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodematgetcln /TheNodegetcln InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1651 148 a tx@Dict begin tx@NodeDict begin { } /TheNoderoot 16 { .5 5.384 0.09999 false .5 17.328 InitRnode } NewNode end end 1651 148 a Fo(JOIN)1475 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderoot /TheNodedots InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1475 491 a tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNoderoot /TheNodematgetcln InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1626 77 a tx@Dict begin tx@NodeDict begin { } /TheNodeselect 16 { .5 5.384 0.09999 false .5 29.336 InitRnode } NewNode end end 1626 77 a Fo(SELECT)1475 491 y tx@Dict begin gsave STV newpath 0.8 SLW 0. setgray /ArrowA { moveto } def /ArrowB { } def tx@NodeDict begin 0.0 0.0 neg 3.0 3.0 /TheNodeselect /TheNoderoot InitNC { NCLine } if end gsave 0.8 SLW 0. setgray 0 setlinecap stroke grestore grestore end 1475 491 a 1569 595 a Fz(\(d\))10 b(E4)p 1850 655 2 644 v 90 657 1761 2 v 1850 665 10 647 v 99 665 1761 10 v 382 769 a FG(Figure)h(9:)16 b(Expressions)9 b(used)i(in)f(generating)g(queries)h(for)g(e)o(xperiments)p 484 918 983 7 v 484 968 2 51 v 510 977 a Fq(Query)p 637 968 V 663 981 a(Indices?)p 821 968 V 848 977 a(Expr)o(ession)p 1048 968 V 1140 953 a(Rules)d(matched)p 1465 968 V 1050 970 417 2 v 484 1018 2 51 v 637 1018 V 821 1018 V 1048 1018 V 1075 1003 a Fz(trans)p 1150 1003 12 2 v 13 w(rules)p 1259 1018 2 51 v 51 w(impl)p 1355 1003 12 2 v 14 w(rules)p 1465 1018 2 51 v 484 1025 983 7 v 484 1075 2 51 v 538 1060 a(Q1)p 637 1075 V 123 w(No)p 821 1075 V 915 1087 a(E1)p 1048 1075 V 188 w(3)p 1259 1075 V 189 w(3)p 1465 1075 V 484 1076 340 2 v 484 1125 2 51 v 538 1110 a(Q2)p 637 1125 V 119 w(Y)l(es)p 821 1125 V 1048 1125 V 1259 1125 V 1465 1125 V 484 1127 983 2 v 484 1177 2 51 v 538 1162 a(Q3)p 637 1177 V 123 w(No)p 821 1177 V 915 1190 a(E2)p 1048 1177 V 1145 1189 a(8)p 1259 1177 V 1353 1190 a(4)p 1465 1177 V 484 1179 340 2 v 484 1227 2 51 v 538 1212 a(Q4)p 637 1227 V 119 w(Y)l(es)p 821 1227 V 1048 1227 V 1259 1227 V 1465 1227 V 484 1229 983 2 v 484 1279 2 51 v 538 1264 a(Q5)p 637 1279 V 123 w(No)p 821 1279 V 915 1291 a(E3)p 1048 1279 V 188 w(9)p 1259 1279 V 1353 1292 a(5)p 1465 1279 V 484 1281 340 2 v 484 1329 2 51 v 538 1314 a(Q6)p 637 1329 V 119 w(Y)l(es)p 821 1329 V 1048 1329 V 1259 1329 V 1465 1329 V 484 1331 983 2 v 484 1381 2 51 v 538 1366 a(Q7)p 637 1381 V 123 w(No)p 821 1381 V 915 1394 a(E4)p 1048 1381 V 179 w(16)p 1259 1381 V 179 w(7)p 1465 1381 V 484 1383 340 2 v 484 1431 2 51 v 538 1416 a(Q8)p 637 1431 V 119 w(Y)l(es)p 821 1431 V 1048 1431 V 1259 1431 V 1465 1431 V 484 1438 983 7 v 636 1515 a FG(T)l(able)j(5:)16 b(Queries)10 b(used)h(in)g(e)o (xperiments)75 1695 y(of)j(JOINs)g(in)g(a)g(query)m(,)h(we)g(v)o(aried) f(the)f(cardinalities)g(of)h(the)g(base)g(classes)g(5)g(times,)h(each)g (time)f(generating)75 1757 y(a)i(query)f(with)g(dif)o(ferent)g(class)g (properties,)h(and)f(a)o(v)o(eraged)i(the)e(run-times)g(o)o(v)o(er)h (the)f(5)h(query)f(instances)g(to)75 1819 y(generate)d(the)g(per)o (-query)g(optimization)e(time.)20 b(Thus,)11 b(each)i(point)e(in)g(our) h(graphs)g(represents)f(the)h(a)o(v)o(erage)h(of)75 1881 y(5)f(queries.)18 b(The)12 b(run-times)f(were)h(measured)814 1865 y Ft(10)864 1881 y FG(using)f(the)g(GNU)h Fc(time)h FG(command.)19 b(All)11 b(e)o(xperiments)h(were)75 1944 y(performed)g(on)e(a)i(lightly)d(loaded)i(DECstation)e(5000/200)g (running)h(Ultrix)g(4.2.)137 2006 y(The)j(optimization)e(times)i(for)h (each)f(query)g(for)h(both)e(approaches)h(\(Prairie)g(and)g(V)-6 b(olcano\))13 b(are)h(sho)o(wn)e(in)75 2068 y(Figures)e(10)h(through)e (13.)16 b(The)11 b(number)f(of)h(joins)e(in)i(each)g(set)f(of)h(graphs) f(was)g(v)o(aried)h(to)f(a)h(maximum)g(of)g(8,)g(or)75 2130 y(until)f(virtual)g(memory)i(was)e(e)o(xhausted.)137 2192 y(The)f(\256rst)g(set)f(of)h(graphs,)g(in)f(Figure)h(10)g(sho)o (ws)e(the)i(performance)g(of)g(a)g(simple)g(relational-type)e(query)m (.)15 b(The)75 2254 y(optimization)d(times)h(are)h(almost)f(identical)g (between)g(Prairie)h(and)f(V)-6 b(olcano,)14 b(and)g(the)f(notable)f (point)h(is)g(that)75 2316 y(the)d(presence)h(of)g(an)f(inde)o(x)g (does)g(not)g(change)g(the)h(optimizer')m(s)f(beha)o(vior)n(,)h(i.e.,)g (the)g(two)e(graphs)h(are)h(identical.)75 2378 y(This)f(arises)h (because)g(the)g(optimizer)f(algebra)h(had)g(only)f(two)g(join)g (algorithms)f(\(pointer)h(join)g(and)h(hash)g(join\),)75 2440 y(neither)g(of)g(which)f(makes)h(use)g(of)g(an)o(y)h(indices.)137 2502 y(The)i(second)g(set)g(of)g(graphs)f(\(Figure)h(11\))g(sho)o(ws)f (the)h(results)f(of)h(optimizing)e(Q3)i(and)g(Q4.)25 b(Here,)15 b(as)g(in)p 75 2543 720 2 v 110 2570 a Fs(10)142 2586 y Fz(Since)10 b(the)g(run-times)g(were)g(too)g(small)g(to)h(be)e (measured)g(accurately)f(with)j Fa(time)p Fz(,)i(each)8 b(query)i(instance)f(was)g(optimized)g(3000)75 2636 y(times)g(\(in)h(a) f(loop\))g(and)g(the)g(total)g(time)h(was)e(di)o(vided)h(by)f(3000)g (to)i(get)f(the)g(per)o(-query)g(optimization)g(time.)952 2793 y FG(18)p eop %%Page: 19 19 19 18 bop 88 12 1766 2 v 88 909 2 898 v 149 744 a @beginspecial 18 @llx 18 @lly 552 @urx 482 @ury 1872 @rwi @setspecial %%BeginDocument: runtime.Q1.ps /m {moveto} bind def /l {lineto} bind def /RJ { stringwidth neg exch neg exch rmoveto } bind def /CS { stringwidth 2 div neg exch 2 div neg exch rmoveto } bind def 0.25 0.25 scale 1 setlinecap /Times-Italic findfont 90 scalefont setfont [] 0 setdash 420 376 m 420 1785 l 2030 1785 l 2030 376 l 420 376 l stroke [] 0 setdash 420 376 m 420 396 l 621 376 m 621 396 l 822 376 m 822 396 l 1023 376 m 1023 396 l 1225 376 m 1225 396 l 1426 376 m 1426 396 l 1627 376 m 1627 396 l 1828 376 m 1828 396 l 2030 376 m 2030 396 l 420 1785 m 420 1765 l 621 1785 m 621 1765 l 822 1785 m 822 1765 l 1023 1785 m 1023 1765 l 1225 1785 m 1225 1765 l 1426 1785 m 1426 1765 l 1627 1785 m 1627 1765 l 1828 1785 m 1828 1765 l 2030 1785 m 2030 1765 l /Times-Italic findfont 91 scalefont setfont /Times-Roman findfont 91 scalefont setfont stroke 420 300 m gsave 420 300 translate 0 rotate 0 -30 m (0) CS (0) show grestore newpath 621 300 m gsave 621 300 translate 0 rotate 0 -30 m (1) CS (1) show grestore newpath 822 300 m gsave 822 300 translate 0 rotate 0 -30 m (2) CS (2) show grestore newpath 1023 300 m gsave 1023 300 translate 0 rotate 0 -30 m (3) CS (3) show grestore newpath 1225 300 m gsave 1225 300 translate 0 rotate 0 -30 m (4) CS (4) show grestore newpath 1426 300 m gsave 1426 300 translate 0 rotate 0 -30 m (5) CS (5) show grestore newpath 1627 300 m gsave 1627 300 translate 0 rotate 0 -30 m (6) CS (6) show grestore newpath 1828 300 m gsave 1828 300 translate 0 rotate 0 -30 m (7) CS (7) show grestore newpath 2030 300 m gsave 2030 300 translate 0 rotate 0 -30 m (8) CS (8) show grestore newpath /Times-Roman findfont 90 scalefont setfont 1225 148 m gsave 1225 148 translate 0 rotate 0 0 m (Number of joins) CS (Number of joins) show grestore newpath 420 376 m 440 376 l 420 611 m 440 611 l 420 846 m 440 846 l 420 1081 m 440 1081 l 420 1315 m 440 1315 l 420 1550 m 440 1550 l 420 1785 m 440 1785 l 2030 376 m 2010 376 l 2030 611 m 2010 611 l 2030 846 m 2010 846 l 2030 1081 m 2010 1081 l 2030 1315 m 2010 1315 l 2030 1550 m 2010 1550 l 2030 1785 m 2010 1785 l /Times-Roman findfont 91 scalefont setfont stroke 366 376 m gsave 366 376 translate 0 rotate 0 -30 m (0) RJ (0) show grestore newpath 366 611 m gsave 366 611 translate 0 rotate 0 -30 m (500) RJ (500) show grestore newpath 366 846 m gsave 366 846 translate 0 rotate 0 -30 m (1000) RJ (1000) show grestore newpath 366 1081 m gsave 366 1081 translate 0 rotate 0 -30 m (1500) RJ (1500) show grestore newpath 366 1315 m gsave 366 1315 translate 0 rotate 0 -30 m (2000) RJ (2000) show grestore newpath 366 1550 m gsave 366 1550 translate 0 rotate 0 -30 m (2500) RJ (2500) show grestore newpath 366 1785 m gsave 366 1785 translate 0 rotate 0 -30 m (3000) RJ (3000) show grestore newpath /Times-Roman findfont 90 scalefont setfont 100 1080 m gsave 100 1080 translate 90 rotate 0 0 m (CPU time \(microseconds\)) CS (CPU time \(microseconds\)) show grestore newpath /Times-Roman findfont 90 scalefont setfont /Times-Bold findfont 90 scalefont setfont 1225 1953 m gsave 1225 1953 translate 0 rotate 0 0 m (N-way Join Queries) CS (N-way Join Queries) show grestore newpath /Times-Bold findfont 84 scalefont setfont /Times-Roman findfont 84 scalefont setfont 1225 1855 m gsave 1225 1855 translate 0 rotate 0 0 m (Average CPU Time for Query 1) CS (Average CPU Time for Query 1) show grestore newpath 420 418 m 621 537 l 822 661 l 1023 789 l 1225 909 l 1426 1046 l 1627 1183 l 1828 1320 l 2030 1449 l stroke 420 418 30 0 360 arc gsave fill grestore stroke 621 537 30 0 360 arc gsave fill grestore stroke 822 661 30 0 360 arc gsave fill grestore stroke 1023 789 30 0 360 arc gsave fill grestore stroke 1225 909 30 0 360 arc gsave fill grestore stroke 1426 1046 30 0 360 arc gsave fill grestore stroke 1627 1183 30 0 360 arc gsave fill grestore stroke 1828 1320 30 0 360 arc gsave fill grestore stroke 2030 1449 30 0 360 arc gsave fill grestore stroke 420 421 m 621 541 l 822 670 l 1023 801 l 1225 935 l 1426 1066 l 1627 1229 l 1828 1355 l 2030 1504 l stroke 420 451 m 390 421 l 420 391 l 450 421 l closepath gsave eofill grestore stroke 621 571 m 591 541 l 621 511 l 651 541 l closepath gsave eofill grestore stroke 822 700 m 792 670 l 822 640 l 852 670 l closepath gsave eofill grestore stroke 1023 831 m 993 801 l 1023 771 l 1053 801 l closepath gsave eofill grestore stroke 1225 965 m 1195 935 l 1225 905 l 1255 935 l closepath gsave eofill grestore stroke 1426 1096 m 1396 1066 l 1426 1036 l 1456 1066 l closepath gsave eofill grestore stroke 1627 1259 m 1597 1229 l 1627 1199 l 1657 1229 l closepath gsave eofill grestore stroke 1828 1385 m 1798 1355 l 1828 1325 l 1858 1355 l closepath gsave eofill grestore stroke 2030 1534 m 2000 1504 l 2030 1474 l 2060 1504 l closepath gsave eofill grestore stroke 420 418 m 621 537 l 822 661 l 1023 789 l 1225 909 l 1426 1046 l 1627 1183 l 1828 1320 l 2030 1449 l stroke 420 421 m 621 541 l 822 670 l 1023 801 l 1225 935 l 1426 1066 l 1627 1229 l 1828 1355 l 2030 1504 l stroke /Times-Roman findfont 90 scalefont setfont 946 1516 m 946 1740 l 1574 1740 l 1574 1516 l 946 1516 l stroke /Times-Roman findfont 90 scalefont setfont 995 1684 m 1191 1684 l stroke 995 1684 30 0 360 arc gsave fill grestore stroke 1191 1684 30 0 360 arc gsave fill grestore stroke 1240 1684 m gsave 1240 1684 translate 0 rotate 0 -30 m (Prairie) show grestore newpath /Times-Roman findfont 90 scalefont setfont 995 1572 m 1191 1572 l stroke 995 1602 m 965 1572 l 995 1542 l 1025 1572 l closepath gsave eofill grestore stroke 1191 1602 m 1161 1572 l 1191 1542 l 1221 1572 l closepath gsave eofill grestore stroke 1240 1572 m gsave 1240 1572 translate 0 rotate 0 -30 m (Volcano) show grestore newpath showpage %%EndDocument @endspecial 453 847 a Fz(\(a\))10 b(Query)e(1)p 976 897 2 873 v 1013 744 a @beginspecial 18 @llx 18 @lly 552 @urx 482 @ury 1872 @rwi @setspecial %%BeginDocument: runtime.Q2.ps /m {moveto} bind def /l {lineto} bind def /RJ { stringwidth neg exch neg exch rmoveto } bind def /CS { stringwidth 2 div neg exch 2 div neg exch rmoveto } bind def 0.25 0.25 scale 1 setlinecap /Times-Italic findfont 90 scalefont setfont [] 0 setdash 420 376 m 420 1785 l 2030 1785 l 2030 376 l 420 376 l stroke [] 0 setdash 420 376 m 420 396 l 621 376 m 621 396 l 822 376 m 822 396 l 1023 376 m 1023 396 l 1225 376 m 1225 396 l 1426 376 m 1426 396 l 1627 376 m 1627 396 l 1828 376 m 1828 396 l 2030 376 m 2030 396 l 420 1785 m 420 1765 l 621 1785 m 621 1765 l 822 1785 m 822 1765 l 1023 1785 m 1023 1765 l 1225 1785 m 1225 1765 l 1426 1785 m 1426 1765 l 1627 1785 m 1627 1765 l 1828 1785 m 1828 1765 l 2030 1785 m 2030 1765 l /Times-Italic findfont 91 scalefont setfont /Times-Roman findfont 91 scalefont setfont stroke 420 300 m gsave 420 300 translate 0 rotate 0 -30 m (0) CS (0) show grestore newpath 621 300 m gsave 621 300 translate 0 rotate 0 -30 m (1) CS (1) show grestore newpath 822 300 m gsave 822 300 translate 0 rotate 0 -30 m (2) CS (2) show grestore newpath 1023 300 m gsave 1023 300 translate 0 rotate 0 -30 m (3) CS (3) show grestore newpath 1225 300 m gsave 1225 300 translate 0 rotate 0 -30 m (4) CS (4) show grestore newpath 1426 300 m gsave 1426 300 translate 0 rotate 0 -30 m (5) CS (5) show grestore newpath 1627 300 m gsave 1627 300 translate 0 rotate 0 -30 m (6) CS (6) show grestore newpath 1828 300 m gsave 1828 300 translate 0 rotate 0 -30 m (7) CS (7) show grestore newpath 2030 300 m gsave 2030 300 translate 0 rotate 0 -30 m (8) CS (8) show grestore newpath /Times-Roman findfont 90 scalefont setfont 1225 148 m gsave 1225 148 translate 0 rotate 0 0 m (Number of joins) CS (Number of joins) show grestore newpath 420 376 m 440 376 l 420 611 m 440 611 l 420 846 m 440 846 l 420 1081 m 440 1081 l 420 1315 m 440 1315 l 420 1550 m 440 1550 l 420 1785 m 440 1785 l 2030 376 m 2010 376 l 2030 611 m 2010 611 l 2030 846 m 2010 846 l 2030 1081 m 2010 1081 l 2030 1315 m 2010 1315 l 2030 1550 m 2010 1550 l 2030 1785 m 2010 1785 l /Times-Roman findfont 91 scalefont setfont stroke 366 376 m gsave 366 376 translate 0 rotate 0 -30 m (0) RJ (0) show grestore newpath 366 611 m gsave 366 611 translate 0 rotate 0 -30 m (500) RJ (500) show grestore newpath 366 846 m gsave 366 846 translate 0 rotate 0 -30 m (1000) RJ (1000) show grestore newpath 366 1081 m gsave 366 1081 translate 0 rotate 0 -30 m (1500) RJ (1500) show grestore newpath 366 1315 m gsave 366 1315 translate 0 rotate 0 -30 m (2000) RJ (2000) show grestore newpath 366 1550 m gsave 366 1550 translate 0 rotate 0 -30 m (2500) RJ (2500) show grestore newpath 366 1785 m gsave 366 1785 translate 0 rotate 0 -30 m (3000) RJ (3000) show grestore newpath /Times-Roman findfont 90 scalefont setfont 100 1080 m gsave 100 1080 translate 90 rotate 0 0 m (CPU time \(microseconds\)) CS (CPU time \(microseconds\)) show grestore newpath /Times-Roman findfont 90 scalefont setfont /Times-Bold findfont 90 scalefont setfont 1225 1953 m gsave 1225 1953 translate 0 rotate 0 0 m (N-way Join Queries) CS (N-way Join Queries) show grestore newpath /Times-Bold findfont 84 scalefont setfont /Times-Roman findfont 84 scalefont setfont 1225 1855 m gsave 1225 1855 translate 0 rotate 0 0 m (Average CPU Time for Query 2) CS (Average CPU Time for Query 2) show grestore newpath 420 418 m 621 539 l 822 664 l 1023 783 l 1225 906 l 1426 1037 l 1627 1176 l 1828 1304 l 2030 1451 l stroke 420 418 30 0 360 arc gsave fill grestore stroke 621 539 30 0 360 arc gsave fill grestore stroke 822 664 30 0 360 arc gsave fill grestore stroke 1023 783 30 0 360 arc gsave fill grestore stroke 1225 906 30 0 360 arc gsave fill grestore stroke 1426 1037 30 0 360 arc gsave fill grestore stroke 1627 1176 30 0 360 arc gsave fill grestore stroke 1828 1304 30 0 360 arc gsave fill grestore stroke 2030 1451 30 0 360 arc gsave fill grestore stroke 420 412 m 621 533 l 822 661 l 1023 796 l 1225 926 l 1426 1063 l 1627 1212 l 1828 1355 l 2030 1504 l stroke 420 442 m 390 412 l 420 382 l 450 412 l closepath gsave eofill grestore stroke 621 563 m 591 533 l 621 503 l 651 533 l closepath gsave eofill grestore stroke 822 691 m 792 661 l 822 631 l 852 661 l closepath gsave eofill grestore stroke 1023 826 m 993 796 l 1023 766 l 1053 796 l closepath gsave eofill grestore stroke 1225 956 m 1195 926 l 1225 896 l 1255 926 l closepath gsave eofill grestore stroke 1426 1093 m 1396 1063 l 1426 1033 l 1456 1063 l closepath gsave eofill grestore stroke 1627 1242 m 1597 1212 l 1627 1182 l 1657 1212 l closepath gsave eofill grestore stroke 1828 1385 m 1798 1355 l 1828 1325 l 1858 1355 l closepath gsave eofill grestore stroke 2030 1534 m 2000 1504 l 2030 1474 l 2060 1504 l closepath gsave eofill grestore stroke /Times-Roman findfont 90 scalefont setfont 946 1516 m 946 1740 l 1574 1740 l 1574 1516 l 946 1516 l stroke /Times-Roman findfont 90 scalefont setfont 995 1684 m 1191 1684 l stroke 995 1684 30 0 360 arc gsave fill grestore stroke 1191 1684 30 0 360 arc gsave fill grestore stroke 1240 1684 m gsave 1240 1684 translate 0 rotate 0 -30 m (Prairie) show grestore newpath /Times-Roman findfont 90 scalefont setfont 995 1572 m 1191 1572 l stroke 995 1602 m 965 1572 l 995 1542 l 1025 1572 l closepath gsave eofill grestore stroke 1191 1602 m 1161 1572 l 1191 1542 l 1221 1572 l closepath gsave eofill grestore stroke 1240 1572 m gsave 1240 1572 translate 0 rotate 0 -30 m (Volcano) show grestore newpath showpage %%EndDocument @endspecial 1316 847 a(\(b\))h(Query)g(2)p 1852 909 2 898 v 88 911 1766 2 v 1853 919 10 901 v 96 919 1766 10 v 503 1023 a FG(Figure)i(10:)k(Query)c(optimization)e(times)i(for)h (Q1)f(and)g(Q2)75 1203 y(Figure)h(10,)h(the)f(presence)h(\(or)f (absence\))h(of)f(indices)g(makes)g(no)g(dif)o(ference.)21 b(Both)12 b(the)g(Prairie)h(and)f(V)-6 b(olcano)75 1265 y(approaches)13 b(ha)o(v)o(e)h(comparable)g(run-times.)22 b(The)14 b(sharp)f(jump)g(in)g(the)g(graphs)g(from)h(7-way)f(to)g (8-way)g(joins)75 1327 y(is)g(due)g(to)g(the)g(fact)g(that)g(since)g (all)g(optimization)e(is)i(done)g(in)f(main)i(memory)m(,)h(dynamic)e (memory)h(allocation)75 1389 y(\(caused)g(by)f Fc(malloc)i FG(calls\))f(results)e(in)h(a)h(lot)f(of)h(thrashing)e(at)i(this)e (point.)23 b(W)l(e)14 b(speculate)f(that)g(in)g(systems)75 1451 y(with)d(more)i(virtual)e(memory)m(,)i(the)f(graphs)g(will)f(be)h (smoother)m(.)137 1514 y(The)16 b(third)f(and)h(fourth)f(sets)h(of)g (graphs)f(in)h(Figures)g(12)f(and)h(13)g(are)g(optimizations)e(of)i (queries)g(with)f(a)75 1576 y(selection)h(predicate.)34 b(In)17 b(these)f(cases,)j(the)e(presence)g(of)g(an)g(inde)o(x)g(makes) g(a)g(dif)o(ference)g(if)g(the)g(inde)o(x)g(is)75 1638 y(referenced)c(in)f(the)g(selection)f(predicate)h(\(as)g(we)h (designed\).)18 b(Also,)12 b(in)g(these)g(two)f(\256gures,)h(the)g (performance)75 1700 y(of)g(both)f(Prairie)h(and)g(V)-6 b(olcano)12 b(was)f(almost)g(identical,)h(e)o(xcept)g(that)f(Prairie)i (does)e(slightly)f(worse)h(due)h(to)f(the)75 1762 y(lar)o(ger)j(number) f(of)j Fc(malloc)f FG(calls)e(that)g(the)g(P2V)g(translator)f (introduces.)22 b(Also,)13 b(note)g(that)g(we)h(could)e(only)75 1824 y(go)i(up)g(to)g(3-way)g(joins)g(before)g(virtual)g(memory)h(was)f (e)o(xhausted.)26 b(As)14 b(the)g(a)o(v)o(ailable)g(memory)i (decreases,)75 1886 y(there)10 b(is)f(increased)h(thrashing)e(\(as)i (sho)o(wn)f(by)g(the)h(sharp)f(changes)h(in)f(slope)g(in)g(the)h (plots\))e(resulting)g(in)i(a)g(much)75 1948 y(slo)o(wer)g (optimization)g(process.)137 2010 y(In)15 b(all)e(four)h(sets)g(of)g (plots,)g(we)h(can)f(see)h(that)e(Prairie)i(performs)f(with)f(almost)h (\(less)g(than)f Fj(5\045)h FG(v)o(ariation\))75 2072 y(the)c(same)i(ef)o(\256cienc)o(y)f(as)f(V)-6 b(olcano.)16 b(In)11 b(e)o(xtreme)g(cases,)g(when)g(memory)g(is)f(scarce,)i(Prairie) f(runs)f(more)h(slo)o(wly)75 2135 y(\(about)17 b Fj(15\045)p FG(\))g(\(e.g.,)k(Figure)c(12\(b\)\),)j(b)o(ut)d(we)g(belie)o(v)o(e)h (that)f(this)f(situation)g(already)h(represents)g(a)h(serious)75 2197 y(bottleneck)10 b(for)h(both)f(V)-6 b(olcano)11 b(and)g(Prairie.)137 2259 y(Figure)g(14)g(sho)o(ws)f(the)g(v)o (ariation)g(of)h(the)g(number)g(of)g(equi)o(v)o(alence)f(classes)h (\(the)o(y)g(are)h(the)f(same)g(in)g(Prairie)75 2321 y(and)i(V)-6 b(olcano\))13 b(as)g(a)h(function)d(of)j(the)f(number)g (of)g(joins)f(in)h(the)g(query)m(.)22 b(The)13 b(gro)o(wth)f(rate)i(of) f(the)g(number)g(of)75 2383 y(equi)o(v)o(alence)f(classes)g(increases)g (with)g(the)g(increase)h(in)f(the)g(comple)o(xity)g(of)h(the)f(e)o (xpressions.)20 b(In)12 b(particular)n(,)75 2445 y(for)f(E3)g(and)g (E4,)g(the)g(introduction)d(of)j(the)g(SELECT)g(operator)f(results)g (in)h(a)g(dramatic)g(increase)h(in)e(the)h(search)75 2507 y(space,)i(since)e(this)g(operator)h(has)g(man)o(y)g(interactions) f(with)g(the)g(other)h(operators)f(of)i(the)e(algebra;)h(this)f(is)h (also)75 2569 y(re\257ected)e(in)e(T)l(able)h(5)g(where)g(E3)g(matches) g(three)g(times)g(as)g(man)o(y)g(trans)p 1220 2569 14 2 v 16 w(rules)f(as)h(E1)g(and)g(E4)f(matches)i(twice)e(as)75 2631 y(man)o(y)i(trans)p 277 2631 V 16 w(rules)f(as)h(E2.)16 b(The)10 b(lesson)e(to)i(be)g(learnt)f(here)h(is)g(that)f(e)o(xtending) g(an)h(e)o(xisting)e(query)h(optimizer)h(by)952 2793 y(19)p eop %%Page: 20 20 20 19 bop 88 12 1766 2 v 88 909 2 898 v 149 744 a @beginspecial 18 @llx 18 @lly 552 @urx 482 @ury 1872 @rwi @setspecial %%BeginDocument: runtime.Q3.ps /m {moveto} bind def /l {lineto} bind def /RJ { stringwidth neg exch neg exch rmoveto } bind def /CS { stringwidth 2 div neg exch 2 div neg exch rmoveto } bind def 0.25 0.25 scale 1 setlinecap /Times-Italic findfont 90 scalefont setfont [] 0 setdash 420 376 m 420 1785 l 2030 1785 l 2030 376 l 420 376 l stroke [] 0 setdash 420 376 m 420 396 l 621 376 m 621 396 l 822 376 m 822 396 l 1023 376 m 1023 396 l 1225 376 m 1225 396 l 1426 376 m 1426 396 l 1627 376 m 1627 396 l 1828 376 m 1828 396 l 2030 376 m 2030 396 l 420 1785 m 420 1765 l 621 1785 m 621 1765 l 822 1785 m 822 1765 l 1023 1785 m 1023 1765 l 1225 1785 m 1225 1765 l 1426 1785 m 1426 1765 l 1627 1785 m 1627 1765 l 1828 1785 m 1828 1765 l 2030 1785 m 2030 1765 l /Times-Italic findfont 91 scalefont setfont /Times-Roman findfont 91 scalefont setfont stroke 420 300 m gsave 420 300 translate 0 rotate 0 -30 m (0) CS (0) show grestore newpath 621 300 m gsave 621 300 translate 0 rotate 0 -30 m (1) CS (1) show grestore newpath 822 300 m gsave 822 300 translate 0 rotate 0 -30 m (2) CS (2) show grestore newpath 1023 300 m gsave 1023 300 translate 0 rotate 0 -30 m (3) CS (3) show grestore newpath 1225 300 m gsave 1225 300 translate 0 rotate 0 -30 m (4) CS (4) show grestore newpath 1426 300 m gsave 1426 300 translate 0 rotate 0 -30 m (5) CS (5) show grestore newpath 1627 300 m gsave 1627 300 translate 0 rotate 0 -30 m (6) CS (6) show grestore newpath 1828 300 m gsave 1828 300 translate 0 rotate 0 -30 m (7) CS (7) show grestore newpath 2030 300 m gsave 2030 300 translate 0 rotate 0 -30 m (8) CS (8) show grestore newpath /Times-Roman findfont 90 scalefont setfont 1225 148 m gsave 1225 148 translate 0 rotate 0 0 m (Number of joins) CS (Number of joins) show grestore newpath 420 376 m 440 376 l 420 517 m 440 517 l 420 658 m 440 658 l 420 799 m 440 799 l 420 940 m 440 940 l 420 1081 m 440 1081 l 420 1221 m 440 1221 l 420 1362 m 440 1362 l 420 1503 m 440 1503 l 420 1644 m 440 1644 l 420 1785 m 440 1785 l 2030 376 m 2010 376 l 2030 517 m 2010 517 l 2030 658 m 2010 658 l 2030 799 m 2010 799 l 2030 940 m 2010 940 l 2030 1081 m 2010 1081 l 2030 1221 m 2010 1221 l 2030 1362 m 2010 1362 l 2030 1503 m 2010 1503 l 2030 1644 m 2010 1644 l 2030 1785 m 2010 1785 l /Times-Roman findfont 91 scalefont setfont stroke 366 376 m gsave 366 376 translate 0 rotate 0 -30 m (0) RJ (0) show grestore newpath 366 517 m gsave 366 517 translate 0 rotate 0 -30 m (500) RJ (500) show grestore newpath 366 658 m gsave 366 658 translate 0 rotate 0 -30 m (1000) RJ (1000) show grestore newpath 366 799 m gsave 366 799 translate 0 rotate 0 -30 m (1500) RJ (1500) show grestore newpath 366 940 m gsave 366 940 translate 0 rotate 0 -30 m (2000) RJ (2000) show grestore newpath 366 1081 m gsave 366 1081 translate 0 rotate 0 -30 m (2500) RJ (2500) show grestore newpath 366 1221 m gsave 366 1221 translate 0 rotate 0 -30 m (3000) RJ (3000) show grestore newpath 366 1362 m gsave 366 1362 translate 0 rotate 0 -30 m (3500) RJ (3500) show grestore newpath 366 1503 m gsave 366 1503 translate 0 rotate 0 -30 m (4000) RJ (4000) show grestore newpath 366 1644 m gsave 366 1644 translate 0 rotate 0 -30 m (4500) RJ (4500) show grestore newpath 366 1785 m gsave 366 1785 translate 0 rotate 0 -30 m (5000) RJ (5000) show grestore newpath /Times-Roman findfont 90 scalefont setfont 100 1080 m gsave 100 1080 translate 90 rotate 0 0 m (CPU time \(microseconds\)) CS (CPU time \(microseconds\)) show grestore newpath /Times-Roman findfont 90 scalefont setfont /Times-Bold findfont 90 scalefont setfont 1225 1953 m gsave 1225 1953 translate 0 rotate 0 0 m (N-way Join Queries) CS (N-way Join Queries) show grestore newpath /Times-Bold findfont 84 scalefont setfont /Times-Roman findfont 84 scalefont setfont 1225 1855 m gsave 1225 1855 translate 0 rotate 0 0 m (Average CPU Time for Query 3) CS (Average CPU Time for Query 3) show grestore newpath 420 401 m 621 489 l 822 578 l 1023 672 l 1225 762 l 1426 865 l 1627 969 l 1828 1076 l 2030 1574 l stroke 420 401 30 0 360 arc gsave fill grestore stroke 621 489 30 0 360 arc gsave fill grestore stroke 822 578 30 0 360 arc gsave fill grestore stroke 1023 672 30 0 360 arc gsave fill grestore stroke 1225 762 30 0 360 arc gsave fill grestore stroke 1426 865 30 0 360 arc gsave fill grestore stroke 1627 969 30 0 360 arc gsave fill grestore stroke 1828 1076 30 0 360 arc gsave fill grestore stroke 2030 1574 30 0 360 arc gsave fill grestore stroke 420 402 m 621 485 l 822 568 l 1023 644 l 1225 736 l 1426 821 l 1627 918 l 1828 1019 l 2030 1511 l stroke 420 432 m 390 402 l 420 372 l 450 402 l closepath gsave eofill grestore stroke 621 515 m 591 485 l 621 455 l 651 485 l closepath gsave eofill grestore stroke 822 598 m 792 568 l 822 538 l 852 568 l closepath gsave eofill grestore stroke 1023 674 m 993 644 l 1023 614 l 1053 644 l closepath gsave eofill grestore stroke 1225 766 m 1195 736 l 1225 706 l 1255 736 l closepath gsave eofill grestore stroke 1426 851 m 1396 821 l 1426 791 l 1456 821 l closepath gsave eofill grestore stroke 1627 948 m 1597 918 l 1627 888 l 1657 918 l closepath gsave eofill grestore stroke 1828 1049 m 1798 1019 l 1828 989 l 1858 1019 l closepath gsave eofill grestore stroke 2030 1541 m 2000 1511 l 2030 1481 l 2060 1511 l closepath gsave eofill grestore stroke /Times-Roman findfont 90 scalefont setfont 946 1516 m 946 1740 l 1574 1740 l 1574 1516 l 946 1516 l stroke /Times-Roman findfont 90 scalefont setfont 995 1684 m 1191 1684 l stroke 995 1684 30 0 360 arc gsave fill grestore stroke 1191 1684 30 0 360 arc gsave fill grestore stroke 1240 1684 m gsave 1240 1684 translate 0 rotate 0 -30 m (Prairie) show grestore newpath /Times-Roman findfont 90 scalefont setfont 995 1572 m 1191 1572 l stroke 995 1602 m 965 1572 l 995 1542 l 1025 1572 l closepath gsave eofill grestore stroke 1191 1602 m 1161 1572 l 1191 1542 l 1221 1572 l closepath gsave eofill grestore stroke 1240 1572 m gsave 1240 1572 translate 0 rotate 0 -30 m (Volcano) show grestore newpath showpage %%EndDocument @endspecial 453 847 a Fz(\(a\))10 b(Query)e(3)p 976 897 2 873 v 1013 744 a @beginspecial 18 @llx 18 @lly 552 @urx 482 @ury 1872 @rwi @setspecial %%BeginDocument: runtime.Q4.ps /m {moveto} bind def /l {lineto} bind def /RJ { stringwidth neg exch neg exch rmoveto } bind def /CS { stringwidth 2 div neg exch 2 div neg exch rmoveto } bind def 0.25 0.25 scale 1 setlinecap /Times-Italic findfont 90 scalefont setfont [] 0 setdash 420 376 m 420 1785 l 2030 1785 l 2030 376 l 420 376 l stroke [] 0 setdash 420 376 m 420 396 l 621 376 m 621 396 l 822 376 m 822 396 l 1023 376 m 1023 396 l 1225 376 m 1225 396 l 1426 376 m 1426 396 l 1627 376 m 1627 396 l 1828 376 m 1828 396 l 2030 376 m 2030 396 l 420 1785 m 420 1765 l 621 1785 m 621 1765 l 822 1785 m 822 1765 l 1023 1785 m 1023 1765 l 1225 1785 m 1225 1765 l 1426 1785 m 1426 1765 l 1627 1785 m 1627 1765 l 1828 1785 m 1828 1765 l 2030 1785 m 2030 1765 l /Times-Italic findfont 91 scalefont setfont /Times-Roman findfont 91 scalefont setfont stroke 420 300 m gsave 420 300 translate 0 rotate 0 -30 m (0) CS (0) show grestore newpath 621 300 m gsave 621 300 translate 0 rotate 0 -30 m (1) CS (1) show grestore newpath 822 300 m gsave 822 300 translate 0 rotate 0 -30 m (2) CS (2) show grestore newpath 1023 300 m gsave 1023 300 translate 0 rotate 0 -30 m (3) CS (3) show grestore newpath 1225 300 m gsave 1225 300 translate 0 rotate 0 -30 m (4) CS (4) show grestore newpath 1426 300 m gsave 1426 300 translate 0 rotate 0 -30 m (5) CS (5) show grestore newpath 1627 300 m gsave 1627 300 translate 0 rotate 0 -30 m (6) CS (6) show grestore newpath 1828 300 m gsave 1828 300 translate 0 rotate 0 -30 m (7) CS (7) show grestore newpath 2030 300 m gsave 2030 300 translate 0 rotate 0 -30 m (8) CS (8) show grestore newpath /Times-Roman findfont 90 scalefont setfont 1225 148 m gsave 1225 148 translate 0 rotate 0 0 m (Number of joins) CS (Number of joins) show grestore newpath 420 376 m 440 376 l 420 517 m 440 517 l 420 658 m 440 658 l 420 799 m 440 799 l 420 940 m 440 940 l 420 1081 m 440 1081 l 420 1221 m 440 1221 l 420 1362 m 440 1362 l 420 1503 m 440 1503 l 420 1644 m 440 1644 l 420 1785 m 440 1785 l 2030 376 m 2010 376 l 2030 517 m 2010 517 l 2030 658 m 2010 658 l 2030 799 m 2010 799 l 2030 940 m 2010 940 l 2030 1081 m 2010 1081 l 2030 1221 m 2010 1221 l 2030 1362 m 2010 1362 l 2030 1503 m 2010 1503 l 2030 1644 m 2010 1644 l 2030 1785 m 2010 1785 l /Times-Roman findfont 91 scalefont setfont stroke 366 376 m gsave 366 376 translate 0 rotate 0 -30 m (0) RJ (0) show grestore newpath 366 517 m gsave 366 517 translate 0 rotate 0 -30 m (500) RJ (500) show grestore newpath 366 658 m gsave 366 658 translate 0 rotate 0 -30 m (1000) RJ (1000) show grestore newpath 366 799 m gsave 366 799 translate 0 rotate 0 -30 m (1500) RJ (1500) show grestore newpath 366 940 m gsave 366 940 translate 0 rotate 0 -30 m (2000) RJ (2000) show grestore newpath 366 1081 m gsave 366 1081 translate 0 rotate 0 -30 m (2500) RJ (2500) show grestore newpath 366 1221 m gsave 366 1221 translate 0 rotate 0 -30 m (3000) RJ (3000) show grestore newpath 366 1362 m gsave 366 1362 translate 0 rotate 0 -30 m (3500) RJ (3500) show grestore newpath 366 1503 m gsave 366 1503 translate 0 rotate 0 -30 m (4000) RJ (4000) show grestore newpath 366 1644 m gsave 366 1644 translate 0 rotate 0 -30 m (4500) RJ (4500) show grestore newpath 366 1785 m gsave 366 1785 translate 0 rotate 0 -30 m (5000) RJ (5000) show grestore newpath /Times-Roman findfont 90 scalefont setfont 100 1080 m gsave 100 1080 translate 90 rotate 0 0 m (CPU time \(microseconds\)) CS (CPU time \(microseconds\)) show grestore newpath /Times-Roman findfont 90 scalefont setfont /Times-Bold findfont 90 scalefont setfont 1225 1953 m gsave 1225 1953 translate 0 rotate 0 0 m (N-way Join Queries) CS (N-way Join Queries) show grestore newpath /Times-Bold findfont 84 scalefont setfont /Times-Roman findfont 84 scalefont setfont 1225 1855 m gsave 1225 1855 translate 0 rotate 0 0 m (Average CPU Time for Query 4) CS (Average CPU Time for Query 4) show grestore newpath 420 400 m 621 492 l 822 575 l 1023 669 l 1225 759 l 1426 866 l 1627 962 l 1828 1069 l 2030 1578 l stroke 420 400 30 0 360 arc gsave fill grestore stroke 621 492 30 0 360 arc gsave fill grestore stroke 822 575 30 0 360 arc gsave fill grestore stroke 1023 669 30 0 360 arc gsave fill grestore stroke 1225 759 30 0 360 arc gsave fill grestore stroke 1426 866 30 0 360 arc gsave fill grestore stroke 1627 962 30 0 360 arc gsave fill grestore stroke 1828 1069 30 0 360 arc gsave fill grestore stroke 2030 1578 30 0 360 arc gsave fill grestore stroke 420 400 m 621 484 l 822 567 l 1023 645 l 1225 735 l 1426 823 l 1627 915 l 1828 1024 l 2030 1517 l stroke 420 430 m 390 400 l 420 370 l 450 400 l closepath gsave eofill grestore stroke 621 514 m 591 484 l 621 454 l 651 484 l closepath gsave eofill grestore stroke 822 597 m 792 567 l 822 537 l 852 567 l closepath gsave eofill grestore stroke 1023 675 m 993 645 l 1023 615 l 1053 645 l closepath gsave eofill grestore stroke 1225 765 m 1195 735 l 1225 705 l 1255 735 l closepath gsave eofill grestore stroke 1426 853 m 1396 823 l 1426 793 l 1456 823 l closepath gsave eofill grestore stroke 1627 945 m 1597 915 l 1627 885 l 1657 915 l closepath gsave eofill grestore stroke 1828 1054 m 1798 1024 l 1828 994 l 1858 1024 l closepath gsave eofill grestore stroke 2030 1547 m 2000 1517 l 2030 1487 l 2060 1517 l closepath gsave eofill grestore stroke /Times-Roman findfont 90 scalefont setfont 946 1516 m 946 1740 l 1574 1740 l 1574 1516 l 946 1516 l stroke /Times-Roman findfont 90 scalefont setfont 995 1684 m 1191 1684 l stroke 995 1684 30 0 360 arc gsave fill grestore stroke 1191 1684 30 0 360 arc gsave fill grestore stroke 1240 1684 m gsave 1240 1684 translate 0 rotate 0 -30 m (Prairie) show grestore newpath /Times-Roman findfont 90 scalefont setfont 995 1572 m 1191 1572 l stroke 995 1602 m 965 1572 l 995 1542 l 1025 1572 l closepath gsave eofill grestore stroke 1191 1602 m 1161 1572 l 1191 1542 l 1221 1572 l closepath gsave eofill grestore stroke 1240 1572 m gsave 1240 1572 translate 0 rotate 0 -30 m (Volcano) show grestore newpath showpage %%EndDocument @endspecial 1316 847 a(\(b\))h(Query)g(4)p 1852 909 2 898 v 88 911 1766 2 v 1853 919 10 901 v 96 919 1766 10 v 503 1023 a FG(Figure)i(11:)k(Query)c(optimization)e(times)i(for)h (Q3)f(and)g(Q4)p 88 1167 1766 2 v 88 2065 2 898 v 149 1899 a @beginspecial 18 @llx 18 @lly 552 @urx 482 @ury 1872 @rwi @setspecial %%BeginDocument: runtime.Q5.ps /m {moveto} bind def /l {lineto} bind def /RJ { stringwidth neg exch neg exch rmoveto } bind def /CS { stringwidth 2 div neg exch 2 div neg exch rmoveto } bind def 0.25 0.25 scale 1 setlinecap /Times-Italic findfont 90 scalefont setfont [] 0 setdash 420 376 m 420 1785 l 2030 1785 l 2030 376 l 420 376 l stroke [] 0 setdash 420 376 m 420 396 l 956 376 m 956 396 l 1493 376 m 1493 396 l 2030 376 m 2030 396 l 420 1785 m 420 1765 l 956 1785 m 956 1765 l 1493 1785 m 1493 1765 l 2030 1785 m 2030 1765 l /Times-Italic findfont 91 scalefont setfont /Times-Roman findfont 91 scalefont setfont stroke 420 300 m gsave 420 300 translate 0 rotate 0 -30 m (0) CS (0) show grestore newpath 956 300 m gsave 956 300 translate 0 rotate 0 -30 m (1) CS (1) show grestore newpath 1493 300 m gsave 1493 300 translate 0 rotate 0 -30 m (2) CS (2) show grestore newpath 2030 300 m gsave 2030 300 translate 0 rotate 0 -30 m (3) CS (3) show grestore newpath /Times-Roman findfont 90 scalefont setfont 1225 148 m gsave 1225 148 translate 0 rotate 0 0 m (Number of joins) CS (Number of joins) show grestore newpath 420 376 m 430 376 l 420 552 m 430 552 l 420 728 m 430 728 l 420 904 m 430 904 l 420 1081 m 430 1081 l 420 1257 m 430 1257 l 420 1433 m 430 1433 l 420 1609 m 430 1609 l 420 1785 m 430 1785 l 2030 376 m 2020 376 l 2030 552 m 2020 552 l 2030 728 m 2020 728 l 2030 904 m 2020 904 l 2030 1081 m 2020 1081 l 2030 1257 m 2020 1257 l 2030 1433 m 2020 1433 l 2030 1609 m 2020 1609 l 2030 1785 m 2020 1785 l stroke 420 376 m 440 376 l 420 728 m 440 728 l 420 1081 m 440 1081 l 420 1433 m 440 1433 l 420 1785 m 440 1785 l 2030 376 m 2010 376 l 2030 728 m 2010 728 l 2030 1081 m 2010 1081 l 2030 1433 m 2010 1433 l 2030 1785 m 2010 1785 l /Times-Roman findfont 91 scalefont setfont stroke 366 376 m gsave 366 376 translate 0 rotate 0 -30 m (0) RJ (0) show grestore newpath 366 728 m gsave 366 728 translate 0 rotate 0 -30 m (2000) RJ (2000) show grestore newpath 366 1081 m gsave 366 1081 translate 0 rotate 0 -30 m (4000) RJ (4000) show grestore newpath 366 1433 m gsave 366 1433 translate 0 rotate 0 -30 m (6000) RJ (6000) show grestore newpath 366 1785 m gsave 366 1785 translate 0 rotate 0 -30 m (8000) RJ (8000) show grestore newpath /Times-Roman findfont 90 scalefont setfont 100 1080 m gsave 100 1080 translate 90 rotate 0 0 m (CPU time \(microseconds\)) CS (CPU time \(microseconds\)) show grestore newpath /Times-Roman findfont 90 scalefont setfont /Times-Bold findfont 90 scalefont setfont 1225 1953 m gsave 1225 1953 translate 0 rotate 0 0 m (N-way Join Queries) CS (N-way Join Queries) show grestore newpath /Times-Bold findfont 84 scalefont setfont /Times-Roman findfont 84 scalefont setfont 1225 1855 m gsave 1225 1855 translate 0 rotate 0 0 m (Average CPU Time for Query 5) CS (Average CPU Time for Query 5) show grestore newpath 420 424 m 956 511 l 1493 671 l 2030 1778 l stroke 420 424 30 0 360 arc gsave fill grestore stroke 956 511 30 0 360 arc gsave fill grestore stroke 1493 671 30 0 360 arc gsave fill grestore stroke 2030 1778 30 0 360 arc gsave fill grestore stroke 420 426 m 956 522 l 1493 688 l 2030 1737 l stroke 420 456 m 390 426 l 420 396 l 450 426 l closepath gsave eofill grestore stroke 956 552 m 926 522 l 956 492 l 986 522 l closepath gsave eofill grestore stroke 1493 718 m 1463 688 l 1493 658 l 1523 688 l closepath gsave eofill grestore stroke 2030 1767 m 2000 1737 l 2030 1707 l 2060 1737 l closepath gsave eofill grestore stroke /Times-Roman findfont 90 scalefont setfont 946 1516 m 946 1740 l 1574 1740 l 1574 1516 l 946 1516 l stroke /Times-Roman findfont 90 scalefont setfont 995 1684 m 1191 1684 l stroke 995 1684 30 0 360 arc gsave fill grestore stroke 1191 1684 30 0 360 arc gsave fill grestore stroke 1240 1684 m gsave 1240 1684 translate 0 rotate 0 -30 m (Prairie) show grestore newpath /Times-Roman findfont 90 scalefont setfont 995 1572 m 1191 1572 l stroke 995 1602 m 965 1572 l 995 1542 l 1025 1572 l closepath gsave eofill grestore stroke 1191 1602 m 1161 1572 l 1191 1542 l 1221 1572 l closepath gsave eofill grestore stroke 1240 1572 m gsave 1240 1572 translate 0 rotate 0 -30 m (Volcano) show grestore newpath showpage %%EndDocument @endspecial 453 2003 a Fz(\(a\))f(Query)e(5)p 976 2052 2 873 v 1013 1899 a @beginspecial 18 @llx 18 @lly 552 @urx 482 @ury 1872 @rwi @setspecial %%BeginDocument: runtime.Q6.ps /m {moveto} bind def /l {lineto} bind def /RJ { stringwidth neg exch neg exch rmoveto } bind def /CS { stringwidth 2 div neg exch 2 div neg exch rmoveto } bind def 0.25 0.25 scale 1 setlinecap /Times-Italic findfont 90 scalefont setfont [] 0 setdash 420 376 m 420 1785 l 2030 1785 l 2030 376 l 420 376 l stroke [] 0 setdash 420 376 m 420 386 l 688 376 m 688 386 l 956 376 m 956 386 l 1225 376 m 1225 386 l 1493 376 m 1493 386 l 1761 376 m 1761 386 l 2030 376 m 2030 386 l 420 1785 m 420 1775 l 688 1785 m 688 1775 l 956 1785 m 956 1775 l 1225 1785 m 1225 1775 l 1493 1785 m 1493 1775 l 1761 1785 m 1761 1775 l 2030 1785 m 2030 1775 l stroke 420 376 m 420 396 l 956 376 m 956 396 l 1493 376 m 1493 396 l 2030 376 m 2030 396 l 420 1785 m 420 1765 l 956 1785 m 956 1765 l 1493 1785 m 1493 1765 l 2030 1785 m 2030 1765 l /Times-Italic findfont 91 scalefont setfont /Times-Roman findfont 91 scalefont setfont stroke 420 300 m gsave 420 300 translate 0 rotate 0 -30 m (0) CS (0) show grestore newpath 956 300 m gsave 956 300 translate 0 rotate 0 -30 m (1) CS (1) show grestore newpath 1493 300 m gsave 1493 300 translate 0 rotate 0 -30 m (2) CS (2) show grestore newpath 2030 300 m gsave 2030 300 translate 0 rotate 0 -30 m (3) CS (3) show grestore newpath /Times-Roman findfont 90 scalefont setfont 1225 148 m gsave 1225 148 translate 0 rotate 0 0 m (Number of joins) CS (Number of joins) show grestore newpath 420 376 m 430 376 l 420 517 m 430 517 l 420 658 m 430 658 l 420 799 m 430 799 l 420 940 m 430 940 l 420 1081 m 430 1081 l 420 1221 m 430 1221 l 420 1362 m 430 1362 l 420 1503 m 430 1503 l 420 1644 m 430 1644 l 420 1785 m 430 1785 l 2030 376 m 2020 376 l 2030 517 m 2020 517 l 2030 658 m 2020 658 l 2030 799 m 2020 799 l 2030 940 m 2020 940 l 2030 1081 m 2020 1081 l 2030 1221 m 2020 1221 l 2030 1362 m 2020 1362 l 2030 1503 m 2020 1503 l 2030 1644 m 2020 1644 l 2030 1785 m 2020 1785 l stroke 420 376 m 440 376 l 420 658 m 440 658 l 420 940 m 440 940 l 420 1221 m 440 1221 l 420 1503 m 440 1503 l 420 1785 m 440 1785 l 2030 376 m 2010 376 l 2030 658 m 2010 658 l 2030 940 m 2010 940 l 2030 1221 m 2010 1221 l 2030 1503 m 2010 1503 l 2030 1785 m 2010 1785 l /Times-Roman findfont 91 scalefont setfont stroke 366 376 m gsave 366 376 translate 0 rotate 0 -30 m (0) RJ (0) show grestore newpath 366 658 m gsave 366 658 translate 0 rotate 0 -30 m (2000) RJ (2000) show grestore newpath 366 940 m gsave 366 940 translate 0 rotate 0 -30 m (4000) RJ (4000) show grestore newpath 366 1221 m gsave 366 1221 translate 0 rotate 0 -30 m (6000) RJ (6000) show grestore newpath 366 1503 m gsave 366 1503 translate 0 rotate 0 -30 m (8000) RJ (8000) show grestore newpath 366 1785 m gsave 366 1785 translate 0 rotate 0 -30 m (10000) RJ (10000) show grestore newpath /Times-Roman findfont 90 scalefont setfont 40 1080 m gsave 40 1080 translate 90 rotate 0 0 m (CPU time \(microseconds\)) CS (CPU time \(microseconds\)) show grestore newpath /Times-Roman findfont 90 scalefont setfont /Times-Bold findfont 90 scalefont setfont 1225 1953 m gsave 1225 1953 translate 0 rotate 0 0 m (N-way Join Queries) CS (N-way Join Queries) show grestore newpath /Times-Bold findfont 84 scalefont setfont /Times-Roman findfont 84 scalefont setfont 1225 1855 m gsave 1225 1855 translate 0 rotate 0 0 m (Average CPU Time for Query 6) CS (Average CPU Time for Query 6) show grestore newpath 420 415 m 956 490 l 1493 633 l 2030 1651 l stroke 420 415 30 0 360 arc gsave fill grestore stroke 956 490 30 0 360 arc gsave fill grestore stroke 1493 633 30 0 360 arc gsave fill grestore stroke 2030 1651 30 0 360 arc gsave fill grestore stroke 420 416 m 956 493 l 1493 631 l 2030 1462 l stroke 420 446 m 390 416 l 420 386 l 450 416 l closepath gsave eofill grestore stroke 956 523 m 926 493 l 956 463 l 986 493 l closepath gsave eofill grestore stroke 1493 661 m 1463 631 l 1493 601 l 1523 631 l closepath gsave eofill grestore stroke 2030 1492 m 2000 1462 l 2030 1432 l 2060 1462 l closepath gsave eofill grestore stroke /Times-Roman findfont 90 scalefont setfont 946 1516 m 946 1740 l 1574 1740 l 1574 1516 l 946 1516 l stroke /Times-Roman findfont 90 scalefont setfont 995 1684 m 1191 1684 l stroke 995 1684 30 0 360 arc gsave fill grestore stroke 1191 1684 30 0 360 arc gsave fill grestore stroke 1240 1684 m gsave 1240 1684 translate 0 rotate 0 -30 m (Prairie) show grestore newpath /Times-Roman findfont 90 scalefont setfont 995 1572 m 1191 1572 l stroke 995 1602 m 965 1572 l 995 1542 l 1025 1572 l closepath gsave eofill grestore stroke 1191 1602 m 1161 1572 l 1191 1542 l 1221 1572 l closepath gsave eofill grestore stroke 1240 1572 m gsave 1240 1572 translate 0 rotate 0 -30 m (Volcano) show grestore newpath showpage %%EndDocument @endspecial 1316 2003 a(\(b\))h(Query)g(6)p 1852 2065 2 898 v 88 2067 1766 2 v 1853 2075 10 901 v 96 2075 1766 10 v 503 2178 a FG(Figure)i(12:)k(Query)c(optimization)e(times)i(for)h (Q5)f(and)g(Q6)75 2358 y(adding)d(operators,)i(algorithms)e(or)i(rules) f(can)h(result)f(in)g(an)g(enormous)g(increase)h(in)f(optimization)f (comple)o(xity)m(,)75 2421 y(especially)15 b(if)h(the)f(additions)f (impact)i(a)g(signi\256cant)e(fraction)i(of)g(the)f(equi)o(v)o(alence)g (classes.)30 b(Extensibility)m(,)75 2483 y(thus,)10 b(must)h(be)h (judiciously)c(coupled)i(with)g(user)h(heuristics)f(to)h(a)o(v)o(oid)f (unpleasant)g(surprises.)137 2545 y(The)g(results)f(presented)g(in)h (this)f(section)g(sho)o(w)g(that)g(Prairie)h(optimizers)g(need)g(not)f (sacri\256ce)h(ef)o(\256cienc)o(y)h(for)75 2607 y(clarity)m(,)f(e)o(v)o (en)h(for)g(lar)o(ge)g(rule)f(sets.)16 b(More)11 b(research)h(and)e(v)o (alidation)f(is)h(necessary)g(to)g(v)o(erify)h(that)f(Prairie)h(is)f (an)952 2793 y(20)p eop %%Page: 21 21 21 20 bop 88 12 1766 2 v 88 909 2 898 v 149 744 a @beginspecial 18 @llx 18 @lly 552 @urx 482 @ury 1872 @rwi @setspecial %%BeginDocument: runtime.Q7.ps /m {moveto} bind def /l {lineto} bind def /RJ { stringwidth neg exch neg exch rmoveto } bind def /CS { stringwidth 2 div neg exch 2 div neg exch rmoveto } bind def 0.25 0.25 scale 1 setlinecap /Times-Italic findfont 90 scalefont setfont [] 0 setdash 420 376 m 420 1785 l 2030 1785 l 2030 376 l 420 376 l stroke [] 0 setdash 420 376 m 420 396 l 956 376 m 956 396 l 1493 376 m 1493 396 l 2030 376 m 2030 396 l 420 1785 m 420 1765 l 956 1785 m 956 1765 l 1493 1785 m 1493 1765 l 2030 1785 m 2030 1765 l /Times-Italic findfont 91 scalefont setfont /Times-Roman findfont 91 scalefont setfont stroke 420 300 m gsave 420 300 translate 0 rotate 0 -30 m (0) CS (0) show grestore newpath 956 300 m gsave 956 300 translate 0 rotate 0 -30 m (1) CS (1) show grestore newpath 1493 300 m gsave 1493 300 translate 0 rotate 0 -30 m (2) CS (2) show grestore newpath 2030 300 m gsave 2030 300 translate 0 rotate 0 -30 m (3) CS (3) show grestore newpath /Times-Roman findfont 90 scalefont setfont 1225 148 m gsave 1225 148 translate 0 rotate 0 0 m (Number of joins) CS (Number of joins) show grestore newpath 420 376 m 430 376 l 420 517 m 430 517 l 420 658 m 430 658 l 420 799 m 430 799 l 420 940 m 430 940 l 420 1081 m 430 1081 l 420 1221 m 430 1221 l 420 1362 m 430 1362 l 420 1503 m 430 1503 l 420 1644 m 430 1644 l 420 1785 m 430 1785 l 2030 376 m 2020 376 l 2030 517 m 2020 517 l 2030 658 m 2020 658 l 2030 799 m 2020 799 l 2030 940 m 2020 940 l 2030 1081 m 2020 1081 l 2030 1221 m 2020 1221 l 2030 1362 m 2020 1362 l 2030 1503 m 2020 1503 l 2030 1644 m 2020 1644 l 2030 1785 m 2020 1785 l stroke 420 376 m 440 376 l 420 658 m 440 658 l 420 940 m 440 940 l 420 1221 m 440 1221 l 420 1503 m 440 1503 l 420 1785 m 440 1785 l 2030 376 m 2010 376 l 2030 658 m 2010 658 l 2030 940 m 2010 940 l 2030 1221 m 2010 1221 l 2030 1503 m 2010 1503 l 2030 1785 m 2010 1785 l /Times-Roman findfont 91 scalefont setfont stroke 366 376 m gsave 366 376 translate 0 rotate 0 -30 m (0) RJ (0) show grestore newpath 366 658 m gsave 366 658 translate 0 rotate 0 -30 m (2000) RJ (2000) show grestore newpath 366 940 m gsave 366 940 translate 0 rotate 0 -30 m (4000) RJ (4000) show grestore newpath 366 1221 m gsave 366 1221 translate 0 rotate 0 -30 m (6000) RJ (6000) show grestore newpath 366 1503 m gsave 366 1503 translate 0 rotate 0 -30 m (8000) RJ (8000) show grestore newpath 366 1785 m gsave 366 1785 translate 0 rotate 0 -30 m (10000) RJ (10000) show grestore newpath /Times-Roman findfont 90 scalefont setfont 40 1080 m gsave 40 1080 translate 90 rotate 0 0 m (CPU time \(microseconds\)) CS (CPU time \(microseconds\)) show grestore newpath /Times-Roman findfont 90 scalefont setfont /Times-Bold findfont 90 scalefont setfont 1225 1953 m gsave 1225 1953 translate 0 rotate 0 0 m (N-way Join Queries) CS (N-way Join Queries) show grestore newpath /Times-Bold findfont 84 scalefont setfont /Times-Roman findfont 84 scalefont setfont 1225 1855 m gsave 1225 1855 translate 0 rotate 0 0 m (Average CPU Time for Query 7) CS (Average CPU Time for Query 7) show grestore newpath 420 425 m 956 510 l 1493 670 l 2030 1637 l stroke 420 425 30 0 360 arc gsave fill grestore stroke 956 510 30 0 360 arc gsave fill grestore stroke 1493 670 30 0 360 arc gsave fill grestore stroke 2030 1637 30 0 360 arc gsave fill grestore stroke 420 420 m 956 501 l 1493 648 l 2030 1470 l stroke 420 450 m 390 420 l 420 390 l 450 420 l closepath gsave eofill grestore stroke 956 531 m 926 501 l 956 471 l 986 501 l closepath gsave eofill grestore stroke 1493 678 m 1463 648 l 1493 618 l 1523 648 l closepath gsave eofill grestore stroke 2030 1500 m 2000 1470 l 2030 1440 l 2060 1470 l closepath gsave eofill grestore stroke /Times-Roman findfont 90 scalefont setfont 946 1516 m 946 1740 l 1574 1740 l 1574 1516 l 946 1516 l stroke /Times-Roman findfont 90 scalefont setfont 995 1684 m 1191 1684 l stroke 995 1684 30 0 360 arc gsave fill grestore stroke 1191 1684 30 0 360 arc gsave fill grestore stroke 1240 1684 m gsave 1240 1684 translate 0 rotate 0 -30 m (Prairie) show grestore newpath /Times-Roman findfont 90 scalefont setfont 995 1572 m 1191 1572 l stroke 995 1602 m 965 1572 l 995 1542 l 1025 1572 l closepath gsave eofill grestore stroke 1191 1602 m 1161 1572 l 1191 1542 l 1221 1572 l closepath gsave eofill grestore stroke 1240 1572 m gsave 1240 1572 translate 0 rotate 0 -30 m (Volcano) show grestore newpath showpage %%EndDocument @endspecial 453 847 a Fz(\(a\))10 b(Query)e(7)p 976 897 2 873 v 1013 744 a @beginspecial 18 @llx 18 @lly 552 @urx 482 @ury 1872 @rwi @setspecial %%BeginDocument: runtime.Q8.ps /m {moveto} bind def /l {lineto} bind def /RJ { stringwidth neg exch neg exch rmoveto } bind def /CS { stringwidth 2 div neg exch 2 div neg exch rmoveto } bind def 0.25 0.25 scale 1 setlinecap /Times-Italic findfont 90 scalefont setfont [] 0 setdash 420 376 m 420 1785 l 2030 1785 l 2030 376 l 420 376 l stroke [] 0 setdash 420 376 m 420 396 l 956 376 m 956 396 l 1493 376 m 1493 396 l 2030 376 m 2030 396 l 420 1785 m 420 1765 l 956 1785 m 956 1765 l 1493 1785 m 1493 1765 l 2030 1785 m 2030 1765 l /Times-Italic findfont 91 scalefont setfont /Times-Roman findfont 91 scalefont setfont stroke 420 300 m gsave 420 300 translate 0 rotate 0 -30 m (0) CS (0) show grestore newpath 956 300 m gsave 956 300 translate 0 rotate 0 -30 m (1) CS (1) show grestore newpath 1493 300 m gsave 1493 300 translate 0 rotate 0 -30 m (2) CS (2) show grestore newpath 2030 300 m gsave 2030 300 translate 0 rotate 0 -30 m (3) CS (3) show grestore newpath /Times-Roman findfont 90 scalefont setfont 1225 148 m gsave 1225 148 translate 0 rotate 0 0 m (Number of joins) CS (Number of joins) show grestore newpath 420 376 m 430 376 l 420 517 m 430 517 l 420 658 m 430 658 l 420 799 m 430 799 l 420 940 m 430 940 l 420 1081 m 430 1081 l 420 1221 m 430 1221 l 420 1362 m 430 1362 l 420 1503 m 430 1503 l 420 1644 m 430 1644 l 420 1785 m 430 1785 l 2030 376 m 2020 376 l 2030 517 m 2020 517 l 2030 658 m 2020 658 l 2030 799 m 2020 799 l 2030 940 m 2020 940 l 2030 1081 m 2020 1081 l 2030 1221 m 2020 1221 l 2030 1362 m 2020 1362 l 2030 1503 m 2020 1503 l 2030 1644 m 2020 1644 l 2030 1785 m 2020 1785 l stroke 420 376 m 440 376 l 420 658 m 440 658 l 420 940 m 440 940 l 420 1221 m 440 1221 l 420 1503 m 440 1503 l 420 1785 m 440 1785 l 2030 376 m 2010 376 l 2030 658 m 2010 658 l 2030 940 m 2010 940 l 2030 1221 m 2010 1221 l 2030 1503 m 2010 1503 l 2030 1785 m 2010 1785 l /Times-Roman findfont 91 scalefont setfont stroke 366 376 m gsave 366 376 translate 0 rotate 0 -30 m (0) RJ (0) show grestore newpath 366 658 m gsave 366 658 translate 0 rotate 0 -30 m (2000) RJ (2000) show grestore newpath 366 940 m gsave 366 940 translate 0 rotate 0 -30 m (4000) RJ (4000) show grestore newpath 366 1221 m gsave 366 1221 translate 0 rotate 0 -30 m (6000) RJ (6000) show grestore newpath 366 1503 m gsave 366 1503 translate 0 rotate 0 -30 m (8000) RJ (8000) show grestore newpath 366 1785 m gsave 366 1785 translate 0 rotate 0 -30 m (10000) RJ (10000) show grestore newpath /Times-Roman findfont 90 scalefont setfont 40 1080 m gsave 40 1080 translate 90 rotate 0 0 m (CPU time \(microseconds\)) CS (CPU time \(microseconds\)) show grestore newpath /Times-Roman findfont 90 scalefont setfont /Times-Bold findfont 90 scalefont setfont 1225 1953 m gsave 1225 1953 translate 0 rotate 0 0 m (N-way Join Queries) CS (N-way Join Queries) show grestore newpath /Times-Bold findfont 84 scalefont setfont /Times-Roman findfont 84 scalefont setfont 1225 1855 m gsave 1225 1855 translate 0 rotate 0 0 m (Average CPU Time for Query 8) CS (Average CPU Time for Query 8) show grestore newpath 420 421 m 956 504 l 1493 650 l 2030 1549 l stroke 420 421 30 0 360 arc gsave fill grestore stroke 956 504 30 0 360 arc gsave fill grestore stroke 1493 650 30 0 360 arc gsave fill grestore stroke 2030 1549 30 0 360 arc gsave fill grestore stroke 420 420 m 956 502 l 1493 647 l 2030 1475 l stroke 420 450 m 390 420 l 420 390 l 450 420 l closepath gsave eofill grestore stroke 956 532 m 926 502 l 956 472 l 986 502 l closepath gsave eofill grestore stroke 1493 677 m 1463 647 l 1493 617 l 1523 647 l closepath gsave eofill grestore stroke 2030 1505 m 2000 1475 l 2030 1445 l 2060 1475 l closepath gsave eofill grestore stroke /Times-Roman findfont 90 scalefont setfont 946 1516 m 946 1740 l 1574 1740 l 1574 1516 l 946 1516 l stroke /Times-Roman findfont 90 scalefont setfont 995 1684 m 1191 1684 l stroke 995 1684 30 0 360 arc gsave fill grestore stroke 1191 1684 30 0 360 arc gsave fill grestore stroke 1240 1684 m gsave 1240 1684 translate 0 rotate 0 -30 m (Prairie) show grestore newpath /Times-Roman findfont 90 scalefont setfont 995 1572 m 1191 1572 l stroke 995 1602 m 965 1572 l 995 1542 l 1025 1572 l closepath gsave eofill grestore stroke 1191 1602 m 1161 1572 l 1191 1542 l 1221 1572 l closepath gsave eofill grestore stroke 1240 1572 m gsave 1240 1572 translate 0 rotate 0 -30 m (Volcano) show grestore newpath showpage %%EndDocument @endspecial 1316 847 a(\(b\))h(Query)g(8)p 1852 909 2 898 v 88 911 1766 2 v 1853 919 10 901 v 96 919 1766 10 v 503 1023 a FG(Figure)i(13:)k(Query)c(optimization)e(times)i(for)h (Q7)f(and)g(Q8)p 90 1167 1761 2 v 90 2298 2 1131 v 371 2285 a @beginspecial 18 @llx 18 @lly 552 @urx 510 @ury 2880 @rwi @setspecial %%BeginDocument: eqlogexp.Q1-8.ps /m {moveto} bind def /l {lineto} bind def /RJ { stringwidth neg exch neg exch rmoveto } bind def /CS { stringwidth 2 div neg exch 2 div neg exch rmoveto } bind def 0.25 0.25 scale 1 setlinecap /Times-Italic findfont 72 scalefont setfont [] 0 setdash 420 376 m 420 1785 l 2030 1785 l 2030 376 l 420 376 l stroke [] 0 setdash 420 376 m 420 396 l 621 376 m 621 396 l 822 376 m 822 396 l 1023 376 m 1023 396 l 1225 376 m 1225 396 l 1426 376 m 1426 396 l 1627 376 m 1627 396 l 1828 376 m 1828 396 l 2030 376 m 2030 396 l 420 1785 m 420 1765 l 621 1785 m 621 1765 l 822 1785 m 822 1765 l 1023 1785 m 1023 1765 l 1225 1785 m 1225 1765 l 1426 1785 m 1426 1765 l 1627 1785 m 1627 1765 l 1828 1785 m 1828 1765 l 2030 1785 m 2030 1765 l /Times-Italic findfont 91 scalefont setfont /Times-Roman findfont 91 scalefont setfont stroke 420 300 m gsave 420 300 translate 0 rotate 0 -30 m (0) CS (0) show grestore newpath 621 300 m gsave 621 300 translate 0 rotate 0 -30 m (1) CS (1) show grestore newpath 822 300 m gsave 822 300 translate 0 rotate 0 -30 m (2) CS (2) show grestore newpath 1023 300 m gsave 1023 300 translate 0 rotate 0 -30 m (3) CS (3) show grestore newpath 1225 300 m gsave 1225 300 translate 0 rotate 0 -30 m (4) CS (4) show grestore newpath 1426 300 m gsave 1426 300 translate 0 rotate 0 -30 m (5) CS (5) show grestore newpath 1627 300 m gsave 1627 300 translate 0 rotate 0 -30 m (6) CS (6) show grestore newpath 1828 300 m gsave 1828 300 translate 0 rotate 0 -30 m (7) CS (7) show grestore newpath 2030 300 m gsave 2030 300 translate 0 rotate 0 -30 m (8) CS (8) show grestore newpath /Times-Roman findfont 90 scalefont setfont 1225 148 m gsave 1225 148 translate 0 rotate 0 0 m (Number of joins) CS (Number of joins) show grestore newpath 420 376 m 440 376 l 420 728 m 440 728 l 420 1081 m 440 1081 l 420 1433 m 440 1433 l 420 1785 m 440 1785 l 2030 376 m 2010 376 l 2030 728 m 2010 728 l 2030 1081 m 2010 1081 l 2030 1433 m 2010 1433 l 2030 1785 m 2010 1785 l /Times-Roman findfont 91 scalefont setfont stroke 366 376 m gsave 366 376 translate 0 rotate 0 -30 m (100) RJ (10) show /Times-Roman findfont 54 scalefont setfont 0 54 rmoveto (0) show /Times-Roman findfont 91 scalefont setfont 0 -54 rmoveto () show grestore newpath 366 728 m gsave 366 728 translate 0 rotate 0 -30 m (102) RJ (10) show /Times-Roman findfont 54 scalefont setfont 0 54 rmoveto (2) show /Times-Roman findfont 91 scalefont setfont 0 -54 rmoveto () show grestore newpath 366 1081 m gsave 366 1081 translate 0 rotate 0 -30 m (104) RJ (10) show /Times-Roman findfont 54 scalefont setfont 0 54 rmoveto (4) show /Times-Roman findfont 91 scalefont setfont 0 -54 rmoveto () show grestore newpath 366 1433 m gsave 366 1433 translate 0 rotate 0 -30 m (106) RJ (10) show /Times-Roman findfont 54 scalefont setfont 0 54 rmoveto (6) show /Times-Roman findfont 91 scalefont setfont 0 -54 rmoveto () show grestore newpath 366 1785 m gsave 366 1785 translate 0 rotate 0 -30 m (108) RJ (10) show /Times-Roman findfont 54 scalefont setfont 0 54 rmoveto (8) show /Times-Roman findfont 91 scalefont setfont 0 -54 rmoveto () show grestore newpath /Times-Roman findfont 90 scalefont setfont 187 1080 m gsave 187 1080 translate 90 rotate 0 0 m (Equivalence classes) CS (Equivalence classes) show grestore newpath /Times-Roman findfont 90 scalefont setfont /Times-Bold findfont 90 scalefont setfont 1225 1953 m gsave 1225 1953 translate 0 rotate 0 0 m (N-way Join Queries) CS (N-way Join Queries) show grestore newpath /Times-Bold findfont 84 scalefont setfont /Times-Roman findfont 84 scalefont setfont 1225 1855 m gsave 1225 1855 translate 0 rotate 0 0 m (Number of Equivalence Classes) CS (Number of Equivalence Classes) show grestore newpath 420 376 m 621 429 l 822 482 l 1023 535 l 1225 588 l 1426 641 l 1627 694 l 1828 747 l 2030 800 l stroke 420 376 30 0 360 arc gsave fill grestore stroke 621 429 30 0 360 arc gsave fill grestore stroke 822 482 30 0 360 arc gsave fill grestore stroke 1023 535 30 0 360 arc gsave fill grestore stroke 1225 588 30 0 360 arc gsave fill grestore stroke 1426 641 30 0 360 arc gsave fill grestore stroke 1627 694 30 0 360 arc gsave fill grestore stroke 1828 747 30 0 360 arc gsave fill grestore stroke 2030 800 30 0 360 arc gsave fill grestore stroke 420 376 m 621 597 l 822 734 l 1023 871 l 1225 1008 l 1426 1145 l 1627 1282 l 1828 1419 l 2030 1556 l stroke 420 406 m 390 376 l 420 346 l 450 376 l closepath gsave eofill grestore stroke 621 627 m 591 597 l 621 567 l 651 597 l closepath gsave eofill grestore stroke 822 764 m 792 734 l 822 704 l 852 734 l closepath gsave eofill grestore stroke 1023 901 m 993 871 l 1023 841 l 1053 871 l closepath gsave eofill grestore stroke 1225 1038 m 1195 1008 l 1225 978 l 1255 1008 l closepath gsave eofill grestore stroke 1426 1175 m 1396 1145 l 1426 1115 l 1456 1145 l closepath gsave eofill grestore stroke 1627 1312 m 1597 1282 l 1627 1252 l 1657 1282 l closepath gsave eofill grestore stroke 1828 1449 m 1798 1419 l 1828 1389 l 1858 1419 l closepath gsave eofill grestore stroke 2030 1586 m 2000 1556 l 2030 1526 l 2060 1556 l closepath gsave eofill grestore stroke 420 376 m 621 578 l 822 805 l 1023 1059 l stroke 420 406 m 390 346 l 450 346 l closepath gsave eofill grestore stroke 621 608 m 591 548 l 651 548 l closepath gsave eofill grestore stroke 822 835 m 792 775 l 852 775 l closepath gsave eofill grestore stroke 1023 1089 m 993 1029 l 1053 1029 l closepath gsave eofill grestore stroke 420 513 m 621 787 l 822 1094 l 1023 1428 l stroke 390 543 m 420 483 l 450 543 l closepath gsave eofill grestore stroke 591 817 m 621 757 l 651 817 l closepath gsave eofill grestore stroke 792 1124 m 822 1064 l 852 1124 l closepath gsave eofill grestore stroke 993 1458 m 1023 1398 l 1053 1458 l closepath gsave eofill grestore stroke /Times-Roman findfont 72 scalefont setfont 1070 1369 m 1070 1729 l 1665 1729 l 1665 1369 l 1070 1369 l stroke /Times-Roman findfont 72 scalefont setfont 1110 1684 m 1270 1684 l stroke 1110 1684 30 0 360 arc gsave fill grestore stroke 1270 1684 30 0 360 arc gsave fill grestore stroke 1310 1684 m gsave 1310 1684 translate 0 rotate 0 -24 m (Query 1, 2) show grestore newpath /Times-Roman findfont 72 scalefont setfont 1110 1594 m 1270 1594 l stroke 1110 1624 m 1080 1594 l 1110 1564 l 1140 1594 l closepath gsave eofill grestore stroke 1270 1624 m 1240 1594 l 1270 1564 l 1300 1594 l closepath gsave eofill grestore stroke 1310 1594 m gsave 1310 1594 translate 0 rotate 0 -24 m (Query 3, 4) show grestore newpath /Times-Roman findfont 72 scalefont setfont 1110 1504 m 1270 1504 l stroke 1110 1534 m 1080 1474 l 1140 1474 l closepath gsave eofill grestore stroke 1270 1534 m 1240 1474 l 1300 1474 l closepath gsave eofill grestore stroke 1310 1504 m gsave 1310 1504 translate 0 rotate 0 -24 m (Query 5, 6) show grestore newpath /Times-Roman findfont 72 scalefont setfont 1110 1414 m 1270 1414 l stroke 1080 1444 m 1110 1384 l 1140 1444 l closepath gsave eofill grestore stroke 1240 1444 m 1270 1384 l 1300 1444 l closepath gsave eofill grestore stroke 1310 1414 m gsave 1310 1414 translate 0 rotate 0 -24 m (Query 7, 8) show grestore newpath showpage %%EndDocument @endspecial 1850 2298 V 90 2300 1761 2 v 1850 2308 10 1134 v 99 2308 1761 10 v 411 2411 a(Figure)g(14:)k(Number)c(of)h(equi)o (v)o(alence)e(classes)g(vs.)i(number)f(of)g(joins)75 2592 y(ef)o(\256cient)g(tool)f(for)i(optimizer)e(speci\256cation.)952 2793 y(21)p eop %%Page: 22 22 22 21 bop 75 14 a FC(5)60 b(Related)13 b(r)o(esear)o(ch)75 124 y FG(The)c(System)f(R)i(optimizer)e([17])h(was)f(the)g(most)h (important)e(de)o(v)o(elopment)h(in)h(query)f(optimization)f(research.) 16 b(It)75 186 y(was)9 b(a)h(cost-based)e(centralized)h(relational)f (query)h(optimizer)g(and)h(introduced)e(a)h(v)o(ariety)g(of)h(ke)o(y)f (concepts)f(like)75 248 y(\252interesting\272)g(e)o(xpressions,)g (cardinality)g(estimation)f(using)h(selecti)o(vity)f(factors)i(and)g (dynamic)g(programming)75 310 y(with)h(pruning)f(of)h(search)h(space.) 17 b(These)10 b(concepts)g(continue)f(to)i(be)f(important)g(in)g(query) g(optimizer)g(research.)137 372 y(The)15 b(query)g(optimizer)f(in)g(R) 611 355 y Fd(\003)646 372 y FG([4,)8 b(14,)f(16])15 b(works)f(in)g (essentially)f(the)i(same)g(way)f(as)h(that)g(of)f(System)h(R,)75 434 y(e)o(xcept)f(that)g(R)320 418 y Fd(\003)354 434 y FG(is)f(a)i(distrib)o(uted)c(database)j(system)g(which)f(introduces)f (some)i(subtle)f(complications)f(in)i(its)75 496 y(query)d(optimizer)m (.)137 558 y(The)f(Starb)o(urst)f(query)g(optimizer)g([11,)e(13,)h(15]) h(uses)g(rules)g(for)h(all)f(decisions)f(that)h(need)h(to)f(be)g(taken) g(by)g(the)75 620 y(query)h(optimizer)m(.)17 b(The)10 b(rules)g(are)i(functional)d(in)h(nature)h(and)f(transform)h(a)g(gi)o (v)o(en)f(operator)g(tree)h(into)f(another)m(.)75 682 y(The)h(rules)f(are)h(commonly)g(those)f(that)g(re\257ect)h(relational) f(calculus)g(facts.)16 b(In)11 b(Starb)o(urst,)g(the)f(query)h(re)o (writing)75 745 y(phase)g(is)g(dif)o(ferent)g(from)h(the)f (optimization)e(phase.)17 b(The)11 b(re)o(writing)g(phase)g(transforms) g(the)g(query)g(itself)f(into)75 807 y(equi)o(v)o(alent)k(operator)h (trees)h(based)f(on)g(relational)g(calculus)f(rules.)30 b(The)15 b(plan)g(optimization)f(phase)h(selects)75 869 y(algorithms)c(for)i(each)g(operator)f(in)g(the)g(operator)g(tree)h (that)f(is)g(obtained)f(after)i(re)o(writing.)19 b(The)13 b(disadv)o(antage)75 931 y(of)d(separating)g(the)g(query)g(re)o(write)g (and)g(the)g(optimization)e(phases)i(is)f(that)h(pruning)f(of)h(the)g (search)h(space)f(is)g(not)75 993 y(possible)f(during)h(query)h(re)o (write,)h(since)e(the)h(re)o(write)g(phase)g(is)g(non-cost-based.)137 1055 y(Fre)o(ytag)i([6])g(describes)g(a)g(rule-based)f(query)h (optimizer)f(similar)g(to)h(Starb)o(urst.)20 b(The)13 b(rules)g(are)g(based)g(on)75 1117 y(LISP-like)f(representations)f(of)h (access)h(plans.)19 b(The)12 b(rules)g(themselv)o(es)g(are)h(recursi)o (v)o(ely)f(de\256ned)g(on)g(smaller)75 1179 y(e)o(xpressions)g (\(operator)g(trees\).)22 b(Although)11 b(se)o(v)o(eral)i(e)o (xpressions)f(can)h(contain)f(a)h(common)h(sub-e)o(xpression,)75 1241 y(Fre)o(ytag)h(doesn')o(t)f(consider)f(the)h(possibility)e(of)i (sharing.)26 b(Expressions)12 b(are)j(e)o(v)o(aluated)f(each)h(time)f (the)o(y)g(are)75 1304 y(encountered.)j(This)11 b(is)g(ob)o(viously)e (inef)o(\256cient.)18 b(In)11 b(addition,)g(as)g(in)h(Starb)o(urst,)f (he)h(doesn')o(t)f(consider)f(the)i(cost)75 1366 y(transformations)e (inherent)g(in)h(an)o(y)g(query)g(optimizer;)f(rules)h(are)h(syntactic) e(transformation)g(rules.)137 1428 y(EXODUS)15 b([7,)8 b(10])15 b(pro)o(vides)f(an)h(optimizer)g(generator)g(which)f(accepts)i (a)f(rule-based)g(speci\256cation)f(of)75 1490 y(the)g(data)g(model)h (as)f(input.)25 b(The)14 b(optimizer)g(generator)g(compiles)g(these)g (rules,)h(together)f(with)f(pre-de\256ned)75 1552 y(rules,)h(to)f (generate)g(an)h(optimizer)f(for)g(the)h(particular)e(data)i(model)f (and)g(set)g(of)h(operators.)23 b(Unlike)11 b(Fre)o(ytag,)75 1614 y(the)i(optimizer)f(generator)h(for)g(EXODUS)g(allo)o(ws)f(for)h (C)h(code)f(along)f(with)g(de\256nitions)f(of)i(ne)o(w)g(rules.)22 b(This)75 1676 y(allo)o(ws)8 b(the)h(database)g(implementor)f(the)h (freedom)h(to)e(associate)h(an)o(y)g(action)g(with)f(a)h(particular)g (rule.)15 b(Operator)75 1738 y(trees)c(in)g(EXODUS)g(are)g(constructed) f(bottom-up)g(from)i(pre)o(viously)d(constructed)h(trees.)137 1800 y(The)j(V)-6 b(olcano)12 b(optimizer)g(generator)g(project)g([8])h (e)o(v)o(olv)o(ed)f(from)h(the)f(EXODUS)g(project.)20 b(It)13 b(is)f(dif)o(ferent)75 1862 y(from)k(all)g(the)f(abo)o(v)o(e)i (optimizers)e(in)g(one)h(signi\256cant)e(way:)25 b(it)15 b(is)g(a)i(top-do)o(wn)d(optimizer)h(compared)h(with)75 1925 y(the)h(bottom-up)e(strate)o(gy)i(of)g(the)f(others.)34 b(Operator)16 b(trees)h(are)h(optimized)e(starting)f(from)j(the)f(root) f(while)75 1987 y(sub-trees)e(are)h(not)g(yet)f(optimized.)26 b(This)14 b(leads)g(to)h(a)g(constraint-dri)o(v)o(en)e(generation)g(of) i(the)g(search)g(space.)75 2049 y(While)f(this)f(method)h(results)f(in) h(a)h(tight)d(control)i(of)g(the)g(search)h(space,)g(it)f(is)g(uncon)n (v)o(entional)e(and)j(requires)75 2111 y(careful)d(attention)d(on)i (the)g(part)g(of)g(the)g(optimizer)g(implementor)g(to)f(ensure)h(that)g (le)o(gal)g(operator)g(trees)g(are)h(not)75 2173 y(accidently)e(left)h (out)g(of)g(the)g(search)g(space.)17 b(W)l(e)12 b(ha)o(v)o(e)f(used)g (V)-6 b(olcano)10 b(as)i(our)f(back-end)g(search)g(engine.)75 2327 y FC(6)60 b(Conclusion)14 b(and)i(futur)o(e)e(w)o(ork)75 2436 y FG(Current)g(rule-based)g(query)g(optimizers)g(do)g(not)f(pro)o (vide)h(a)h(v)o(ery)g(intuiti)o(v)o(e)d(and)i(conceptually)f (streamlined)75 2498 y(frame)o(work)8 b(to)f(de\256ne)h(rules)f(and)h (actions.)14 b(Our)8 b(e)o(xperiences)g(with)e(the)i(V)-6 b(olcano)7 b(optimizer)g(generator)h(suggest)75 2560 y(that)h(its)h(model)g(of)g(rules)f(and)h(the)g(e)o(xpression)f(of)h (these)g(rules)g(is)f(much)i(more)f(complicated)g(and)g(too)f(lo)o (w-le)o(v)o(el)75 2622 y(than)14 b(it)f(needs)h(to)g(be.)26 b(As)14 b(a)g(consequence,)h(rule)f(sets)g(in)g(V)-6 b(olcano)13 b(are)i(fragile,)g(hard)g(to)e(write,)i(and)f(deb)o(ug.)952 2793 y(22)p eop %%Page: 23 23 23 22 bop 75 14 a FG(Similar)11 b(problems)g(may)g(e)o(xist)g(in)g (other)f(contemporary)h(rule-based)g(query)g(optimizers.)137 77 y(W)l(e)k(belie)o(v)o(e)e(that)g(rule-based)h(query)f(optimizers)g (will)g(be)h(standard)e(tools)h(of)h(future)f(database)h(systems.)75 139 y(The)k(pragmatic)h(dif)o(\256culties)e(of)h(using)f(e)o(xisting)g (rule-based)h(optimizers)g(led)g(us)g(to)g(de)o(v)o(elop)g(Prairie,)j (an)75 201 y(e)o(xtensible)15 b(and)g(structured)g(algebraic)h(frame)o (work)f(for)h(specifying)f(rules.)30 b(Prairie)16 b(is)f(similar)g(to)h (e)o(xisting)75 263 y(optimizers)10 b(in)h(that)g(it)g(supports)e(both) i(transformation)f(rules)h(and)g(implementation)f(rules.)16 b(Ho)o(we)o(v)o(er)n(,)c(Prairie)75 325 y(makes)f(se)o(v)o(eral)g (impro)o(v)o(ements:)124 420 y(1.)21 b(it)10 b(of)o(fers)i(a)f (conceptually)f(more)i(streamlined)e(model)h(for)g(rule)g (speci\256cation;)124 516 y(2.)21 b(rules)11 b(are)g(encapsulated,)g (there)g(are)h(no)f(\252hidden\272)f(operators)h(or)g(\252hidden\272)f (algorithms;)124 611 y(3.)21 b(implementation)10 b(hints)f(\(e.g.,)k (enforcers\))e(are)h(deduced)f(automatically;)124 706 y(4.)21 b(and)11 b(it)f(has)h(ef)o(\256cient)h(implementations.)137 801 y(W)l(e)k(ha)o(v)o(e)g(e)o(xplained)e(ho)o(w)h(the)f(\256rst)i (three)f(points)e(are)j(important)e(for)i(simplifying)d(rule)i (speci\256cations)75 864 y(and)f(making)g(rule)h(sets)f(less)f(brittle) h(for)g(e)o(xtensibility)m(.)24 b(A)15 b(consequence)f(is)g(that)g (Prairie)g(rules)g(are)i(simpler)75 926 y(and)11 b(more)h(rob)o(ust)e (than)h(rules)g(of)g(e)o(xisting)f(optimizers)g(\(e.g.,)j(V)-6 b(olcano\).)16 b(W)l(e)c(addressed)f(the)g(fourth)g(point)f(by)75 988 y(b)o(uilding)d(a)j(P2V)f(pre-processor)f(which)h(uses)g (sophisticated)d(algorithms)i(to)h(compose)g(and)g(compact)g(a)h (Prairie)75 1050 y(rule)j(set)f(into)g(a)h(V)-6 b(olcano)12 b(rule)h(set.)21 b(T)l(o)13 b(demonstrate)f(the)h(scalability)e(of)i (our)f(approach,)i(we)f(re)o(wrote)g(the)f(TI)75 1112 y(Open)i(OODB)f(rule)h(set)g(as)g(a)g(Prairie)g(rule)g(set,)h (generated)e(its)g(V)-6 b(olcano)14 b(counterpart,)g(and)f(sho)o(wed)g (that)g(the)75 1174 y(performance)f(of)f(the)f(synthesized)f(V)-6 b(olcano)10 b(rule)h(set)f(closely)g(matches)h(that)f(of)h(the)g (hand-designed)e(V)-6 b(olcano)75 1236 y(rule)11 b(set.)137 1298 y(Our)e(future)g(work)f(will)g(concentrate)h(on)g(de)o(v)o (eloping)f(higher)o(-le)o(v)o(el)g(abstractions)f(using)h(Prairie,)i (including)75 1360 y(automatically)g(generating)g(Prairie)h(rule)g (sets,)g(and)g(combining)e(multiple)h(Prairie)i(rule)f(sets)f(to)h (automatically)75 1423 y(generate)g(ef)o(\256cient)g(optimizers.)75 1576 y FC(Ackno)o(wledgments)75 1685 y FG(W)l(e)17 b(wish)e(to)g(thank) g(T)m(e)o(xas)h(Instruments,)h(Inc.)f(for)h(making)e(the)h(Open)g(OODB) g(source)f(code)h(a)o(v)o(ailable)g(to)75 1748 y(us.)i(Comments)12 b(by)f(Jos)s(\302)-18 b(e)11 b(Blakele)o(y)m(,)h(Anne)g(Ngu,)g(V)m(i)o (v)o(ek)f(Singhal)g(and)g(Thomas)h(W)l(oo)f(greatly)h(impro)o(v)o(ed)f (the)75 1810 y(quality)f(of)h(the)g(paper)m(.)75 1963 y FC(Refer)o(ences)98 2073 y FG([1])20 b(D.)11 b(S.)g(Batory)m(.)16 b(Building)8 b(blocks)i(of)g(database)g(management)h(systems.)j(T)m (echnical)c(Report)g(TR\26187\26123,)171 2135 y(The)i(Uni)o(v)o(ersity) d(of)i(T)m(e)o(xas)g(at)g(Austin,)f(February)i(1988.)98 2230 y([2])20 b(Jos)s(\302)-18 b(e)16 b(A.)g(Blakele)o(y)m(,)i(W)n (illiam)d(J.)i(McK)o(enna,)g(and)f(Goetz)g(Graefe.)30 b(Experiences)16 b(b)o(uilding)e(the)i(Open)171 2292 y(OODB)g(query)g(optimizer)m(.)28 b(In)16 b FB(Pr)n(oceedings)e(1993)h (A)o(CM)h(SIGMOD)f(International)e(Confer)n(ence)j(on)171 2354 y(Management)9 b(of)i(Data)p FG(,)g(pages)f(287\261296,)g(W)l (ashington,)g(May)i(1993.)98 2449 y([3])20 b(Michael)c(J.)g(Care)o(y)m (,)i(Da)o(vid)d(J.)h(DeW)n(itt,)h(Daniel)e(Frank,)i(Goetz)e(Graefe,)j (M.)f(Muralikrishna,)f(Joel)f(E.)171 2512 y(Richardson,)20 b(and)e(Eugene)g(J.)g(Shekita.)34 b(The)18 b(architecture)g(of)g(the)g (EXODUS)g(e)o(xtensible)f(DBMS.)171 2574 y(In)d FB(Pr)n(oceedings)d (International)f(W)l(orkshop)h(on)i(Object-Oriented)e(Database)g (Systems)p FG(,)i(pages)g(52\26165,)171 2636 y(Asilomar)n(,)f (September)f(1986.)952 2793 y(23)p eop %%Page: 24 24 24 23 bop 98 14 a FG([4])20 b(Dean)15 b(Daniels,)f(P)o(atricia)g (Selinger)n(,)h(Laura)f(Haas,)h(Bruce)g(Lindsay)m(,)e(C.)i(Mohan,)g (Adrian)e(W)l(alker)n(,)i(and)171 77 y(P)o(aul)j(W)n(ilms.)32 b(An)17 b(introduction)d(to)j(distrib)o(uted)e(query)i(compilation)e (in)i(R)1446 60 y Fd(\003)1466 77 y FG(.)32 b(In)17 b FB(Pr)n(oceedings)f(2nd)171 139 y(International)9 b(Confer)n(ence)i(on) g(Distrib)o(uted)d(Databases)p FG(,)i(pages)h(291\261309,)f(Berlin,)h (September)h(1982.)98 233 y([5])20 b(Dinesh)12 b(Das)h(and)f(Don)g (Batory)m(.)21 b(Prairie:)e(An)13 b(algebraic)f(frame)o(work)h(for)g (rule)g(speci\256cation)e(in)h(query)171 295 y(optimizers.)26 b(In)15 b FB(Pr)n(oceedings)e(of)i(the)f(W)l(orkshop)f(on)i(Database)e (Query)i(Optimizer)e(Gener)o(ators)g(and)171 357 y(Rule-Based)d (Optimizers)p FG(,)f(pages)i(139\261154,)f(Dallas,)h(September)g(1993.) 98 451 y([6])20 b(Johann)8 b(Christoph)e(Fre)o(ytag.)12 b(A)c(rule-based)g(vie)o(w)f(of)h(query)g(optimization.)i(In)e FB(Pr)n(oceedings)e(1987)h(A)o(CM)171 514 y(SIGMOD)13 b(International)d(Confer)n(ence)j(on)f(Management)f(of)h(Data)p FG(,)h(pages)g(173\261180,)f(San)h(Francisco,)171 576 y(May)f(1987.)98 670 y([7])20 b(Goetz)13 b(Graefe.)23 b FB(Rule-Based)12 b(Query)h(Optimizatio)o(n)d(in)j(Extensible)f (Database)f(Systems)p FG(.)21 b(PhD)13 b(thesis,)171 732 y(Uni)o(v)o(ersity)d(of)h(W)n(isconsin\261Madison,)e(1987.)98 826 y([8])20 b(Goetz)12 b(Graefe.)19 b(V)-6 b(olcano,)12 b(an)g(e)o(xtensible)e(and)i(parallel)f(query)h(e)o(v)o(aluation)e (system.)17 b(T)m(echnical)11 b(Report)171 888 y (CU\261CS\261481\26190,)g(Uni)o(v)o(ersity)e(of)i(Colorado)g(at)g (Boulder)n(,)h(July)e(1990.)98 983 y([9])20 b(Goetz)c(Graefe.)31 b(Query)15 b(e)o(v)o(aluation)g(techniques)f(for)i(lar)o(ge)h (databases.)29 b FB(A)o(CM)15 b(Computing)g(Surve)o(ys)p FG(,)171 1045 y(25\(2\):73\261170,)10 b(June)g(1993.)75 1139 y([10])20 b(Goetz)f(Graefe)i(and)e(Da)o(vid)f(J.)i(DeW)n(itt.)37 b(The)19 b(EXODUS)g(optimizer)f(generator)m(.)39 b(In)19 b FB(Pr)n(oceedings)171 1201 y(1987)12 b(A)o(CM)f(SIGMOD)h (International)d(Confer)n(ence)j(on)f(Management)f(of)i(Data)p FG(,)f(pages)h(387\261394,)f(San)171 1263 y(Francisco,)h(May)g(1987.)75 1358 y([11])20 b(L.)15 b(M.)g(Haas,)h(J.)e(C.)h(Fre)o(ytag,)h(G.)e(M.)i (Lohman,)f(and)f(H.)g(Pirahesh.)25 b(Extensible)12 b(query)i (processing)f(in)171 1420 y(Starb)o(urst.)j(Research)c(Report)f(RJ)h (6610,)e(IBM)j(Almaden)e(Research)h(Center)n(,)g(December)g(1988.)75 1514 y([12])20 b(W)l(on)9 b(Kim,)g(Da)o(vid)e(S.)j(Reiner)n(,)f(and)f (Don)g(S.)h(Batory)m(,)g(editors.)i FB(Query)d(Pr)n(ocessing)e(in)i (Database)f(Systems)p FG(.)171 1576 y(Springer)o(-V)-5 b(erlag,)12 b(1985.)75 1671 y([13])20 b(Guy)12 b(M.)i(Lohman.)19 b(Grammar)o(-like)12 b(functional)f(rules)h(for)h(representing)e(query) h(optimization)e(alterna-)171 1733 y(ti)o(v)o(es.)15 b(In)10 b FB(Pr)n(oceedings)e(1988)i(A)o(CM)f(SIGMOD)h(International)d (Confer)n(ence)j(on)g(Management)e(of)i(Data)p FG(,)171 1795 y(pages)h(18\26127,)g(Chicago,)g(June)g(1988.)75 1889 y([14])20 b(Guy)13 b(M.)h(Lohman,)g(C.)g(Mohan,)h(Laura)e(M.)h (Haas,)h(Bruce)f(G.)f(Lindsay)m(,)g(P)o(atricia)h(G.)f(Selinger)n(,)h (P)o(aul)g(F)l(.)171 1951 y(W)n(ilms,)e(and)f(Dean)h(Daniels.)k(Query)c (processing)e(in)h(R)1075 1935 y Fd(\003)1095 1951 y FG(.)17 b(Research)c(Report)e(RJ)h(4272,)f(IBM)h(Research)171 2013 y(Laboratory)m(,)f(San)h(Jose,)f(April)f(1984.)75 2108 y([15])20 b(P)-5 b(.)14 b(Schwarz,)f(W)l(.)g(Chang,)f(J.)h(C.)g (Fre)o(ytag,)h(G.)e(Lohman,)h(J.)g(McPherson,)g(C.)g(Mohan,)g(and)f(H.) h(Pirahesh.)171 2170 y(Extensibility)i(in)i(the)g(Starb)o(urst)g (database)h(system.)33 b(In)18 b FB(Pr)n(oceedings)e(International)f(W) l(orkshop)h(on)171 2232 y(Object-Oriented)10 b(Database)f(Systems)p FG(,)i(pages)g(85\26192,)f(Asilomar)n(,)h(September)h(1986.)75 2326 y([16])20 b(P)-5 b(.)13 b(G.)g(Selinger)e(and)h(M.)h(Adiba.)18 b(Access)12 b(path)f(selection)g(in)h(distrib)o(uted)d(data)j(base)g (management)h(sys-)171 2388 y(tems.)19 b(In)13 b(Deen)f(and)g (Hammersly)m(,)h(editors,)e FB(Pr)n(oceedings)g(International)e(Confer) n(ence)j(on)g(Databases)p FG(,)171 2450 y(pages)f(204\261215,)f(Uni)o (v)o(ersity)g(of)h(Aberdeen,)g(July)f(1980.)75 2545 y([17])20 b(P)-5 b(.)14 b(G.)e(Selinger)n(,)h(M.)g(M.)h(Astrahan,)e(D.)g(D.)h (Chamberlin,)g(R.)g(A.)g(Lorie,)f(and)g(T)m(.)h(G.)f(Price.)21 b(Access)12 b(path)171 2607 y(selection)h(in)h(a)g(relational)f (database)h(management)g(system.)24 b(In)14 b FB(Pr)n(oceedings)e(1979) h(A)o(CM)h(SIGMOD)171 2669 y(International)9 b(Confer)n(ence)i(on)g (Management)e(of)h(Data)p FG(,)h(pages)g(23\26134,)f(Boston,)h(May)g (1979.)952 2793 y(24)p eop %%Page: 25 25 25 24 bop 75 14 a FG([18])20 b(Michael)14 b(Stonebraker)f(and)h(La)o (wrence)g(A.)g(Ro)o(we.)23 b(The)14 b(design)e(of)i(Postgres.)22 b(In)14 b FB(Pr)n(oceedings)e(1986)171 77 y(A)o(CM)g(SIGMOD)f (International)e(Confer)n(ence)j(on)g(Management)d(of)i(Data)p FG(,)h(pages)f(340\261355,)g(W)l(ashing-)171 139 y(ton,)g(May)h(1986.) 75 234 y([19])20 b(Da)o(vid)14 b(L.)f(W)l(ells,)i(Jos)s(\302)-18 b(e)13 b(A.)h(Blakele)o(y)m(,)g(and)g(Craig)f(W)l(.)h(Thompson.)22 b(Architecture)13 b(of)h(an)g(open)f(object-)171 296 y(oriented)e(database)g(management)g(system.)16 b FB(IEEE)11 b(Computer)p FG(,)g(25\(10\):74\26182,)e(October)i(1992.)75 391 y([20])20 b(C.)11 b(T)m(.)e(Y)-5 b(u)9 b(and)h(C.)g(C.)g(Chang.)k (Distrib)o(uted)7 b(query)i(processing.)k FB(A)o(CM)c(Computing)f (Surve)o(ys)p FG(,)h(16\(4\):399\261)171 453 y(433,)i(December)i(1984.) 952 2793 y(25)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF