simple-inner-join-after-normalization.svg 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  3. "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  4. <!-- Generated by graphviz version 2.43.0 (0)
  5. -->
  6. <!-- Title: G Pages: 1 -->
  7. <svg width="1314pt" height="676pt"
  8. viewBox="0.00 0.00 1314.00 676.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  9. <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 672)">
  10. <title>G</title>
  11. <polygon fill="white" stroke="transparent" points="-4,4 -4,-672 1310,-672 1310,4 -4,4"/>
  12. <text text-anchor="middle" x="330" y="-7.8" font-family="Times,serif" font-size="14.00">select * from t1 inner join t2 on t1.f1 = t2.f2 inner join t3 on t1.f1 = t3.f1; (after rewrites)</text>
  13. <g id="clust1" class="cluster">
  14. <title>cluster0</title>
  15. <polygon fill="none" stroke="black" points="16,-205 16,-498 1298,-498 1298,-205 16,-205"/>
  16. <text text-anchor="middle" x="66.5" y="-482.8" font-family="Times,serif" font-size="14.00">Box0:Select</text>
  17. </g>
  18. <g id="clust3" class="cluster">
  19. <title>cluster5</title>
  20. <polygon fill="none" stroke="black" points="796,-31 796,-186 958,-186 958,-31 796,-31"/>
  21. <text text-anchor="middle" x="872" y="-170.8" font-family="Times,serif" font-size="14.00">Box5:BaseTable T3</text>
  22. </g>
  23. <g id="clust5" class="cluster">
  24. <title>cluster4</title>
  25. <polygon fill="none" stroke="black" points="464,-31 464,-186 626,-186 626,-31 464,-31"/>
  26. <text text-anchor="middle" x="540" y="-170.8" font-family="Times,serif" font-size="14.00">Box4:BaseTable T2</text>
  27. </g>
  28. <g id="clust7" class="cluster">
  29. <title>cluster3</title>
  30. <polygon fill="none" stroke="black" points="8,-31 8,-186 170,-186 170,-31 8,-31"/>
  31. <text text-anchor="middle" x="84" y="-170.8" font-family="Times,serif" font-size="14.00">Box3:BaseTable T1</text>
  32. </g>
  33. <!-- boxhead0 -->
  34. <g id="node1" class="node">
  35. <title>boxhead0</title>
  36. <polygon fill="none" stroke="black" points="1144,-213.5 1144,-443.5 1290,-443.5 1290,-213.5 1144,-213.5"/>
  37. <text text-anchor="middle" x="1217" y="-428.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  38. <polyline fill="none" stroke="black" points="1144,-420.5 1290,-420.5 "/>
  39. <text text-anchor="middle" x="1217" y="-405.3" font-family="Times,serif" font-size="14.00">0: Q0.c0 as F1</text>
  40. <polyline fill="none" stroke="black" points="1144,-397.5 1290,-397.5 "/>
  41. <text text-anchor="middle" x="1217" y="-382.3" font-family="Times,serif" font-size="14.00">1: Q0.c1 as F2</text>
  42. <polyline fill="none" stroke="black" points="1144,-374.5 1290,-374.5 "/>
  43. <text text-anchor="middle" x="1217" y="-359.3" font-family="Times,serif" font-size="14.00">2: Q0.c2 as F3</text>
  44. <polyline fill="none" stroke="black" points="1144,-351.5 1290,-351.5 "/>
  45. <text text-anchor="middle" x="1217" y="-336.3" font-family="Times,serif" font-size="14.00">3: Q1.c0 as F1</text>
  46. <polyline fill="none" stroke="black" points="1144,-328.5 1290,-328.5 "/>
  47. <text text-anchor="middle" x="1217" y="-313.3" font-family="Times,serif" font-size="14.00">4: Q1.c1 as F2</text>
  48. <polyline fill="none" stroke="black" points="1144,-305.5 1290,-305.5 "/>
  49. <text text-anchor="middle" x="1217" y="-290.3" font-family="Times,serif" font-size="14.00">5: Q1.c2 as F3</text>
  50. <polyline fill="none" stroke="black" points="1144,-282.5 1290,-282.5 "/>
  51. <text text-anchor="middle" x="1217" y="-267.3" font-family="Times,serif" font-size="14.00">6: Q3.c0 as F1</text>
  52. <polyline fill="none" stroke="black" points="1144,-259.5 1290,-259.5 "/>
  53. <text text-anchor="middle" x="1217" y="-244.3" font-family="Times,serif" font-size="14.00">7: Q3.c1 as F2</text>
  54. <polyline fill="none" stroke="black" points="1144,-236.5 1290,-236.5 "/>
  55. <text text-anchor="middle" x="1217" y="-221.3" font-family="Times,serif" font-size="14.00">8: Q3.c2 as F3</text>
  56. </g>
  57. <!-- Q0 -->
  58. <g id="node2" class="node">
  59. <title>Q0</title>
  60. <ellipse fill="none" stroke="black" cx="89" cy="-328.5" rx="64.99" ry="64.99"/>
  61. <text text-anchor="middle" x="89" y="-324.8" font-family="Times,serif" font-size="14.00">Q0(F) as T1</text>
  62. </g>
  63. <!-- Q0&#45;&gt;Q0 -->
  64. <g id="edge3" class="edge">
  65. <title>Q0&#45;&gt;Q0</title>
  66. <path fill="none" stroke="black" d="M149.43,-352.88C162.51,-350.5 171.99,-342.37 171.99,-328.5 171.99,-314.63 162.51,-306.5 149.43,-304.12"/>
  67. <text text-anchor="middle" x="254.99" y="-324.8" font-family="Times,serif" font-size="14.00">NOT ((Q0.c0) IS NULL)</text>
  68. </g>
  69. <!-- Q1 -->
  70. <g id="node3" class="node">
  71. <title>Q1</title>
  72. <ellipse fill="none" stroke="black" cx="545" cy="-328.5" rx="64.99" ry="64.99"/>
  73. <text text-anchor="middle" x="545" y="-324.8" font-family="Times,serif" font-size="14.00">Q1(F) as T2</text>
  74. </g>
  75. <!-- Q0&#45;&gt;Q1 -->
  76. <g id="edge2" class="edge">
  77. <title>Q0&#45;&gt;Q1</title>
  78. <path fill="none" stroke="black" d="M154.33,-328.5C241.02,-328.5 393.16,-328.5 479.79,-328.5"/>
  79. <text text-anchor="middle" x="317" y="-335.3" font-family="Times,serif" font-size="14.00">(Q0.c0) = (Q1.c1)</text>
  80. </g>
  81. <!-- Q3 -->
  82. <g id="node4" class="node">
  83. <title>Q3</title>
  84. <ellipse fill="none" stroke="black" cx="877" cy="-328.5" rx="64.99" ry="64.99"/>
  85. <text text-anchor="middle" x="877" y="-324.8" font-family="Times,serif" font-size="14.00">Q3(F) as T3</text>
  86. </g>
  87. <!-- Q0&#45;&gt;Q3 -->
  88. <g id="edge1" class="edge">
  89. <title>Q0&#45;&gt;Q3</title>
  90. <path fill="none" stroke="black" d="M146.07,-359.73C218.92,-397.65 350.04,-459.47 471,-483 543.42,-497.09 740.57,-522.32 803,-483 834.58,-463.11 852.98,-425.59 863.54,-392.51"/>
  91. <text text-anchor="middle" x="483" y="-509.8" font-family="Times,serif" font-size="14.00">(Q0.c0) = (Q3.c0)</text>
  92. </g>
  93. <!-- boxhead3 -->
  94. <g id="node7" class="node">
  95. <title>boxhead3</title>
  96. <polygon fill="none" stroke="black" points="16,-39.5 16,-131.5 162,-131.5 162,-39.5 16,-39.5"/>
  97. <text text-anchor="middle" x="89" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  98. <polyline fill="none" stroke="black" points="16,-108.5 162,-108.5 "/>
  99. <text text-anchor="middle" x="89" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  100. <polyline fill="none" stroke="black" points="16,-85.5 162,-85.5 "/>
  101. <text text-anchor="middle" x="89" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  102. <polyline fill="none" stroke="black" points="16,-62.5 162,-62.5 "/>
  103. <text text-anchor="middle" x="89" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  104. </g>
  105. <!-- Q0&#45;&gt;boxhead3 -->
  106. <g id="edge6" class="edge">
  107. <title>Q0&#45;&gt;boxhead3</title>
  108. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M89,-263.23C89,-239.53 89,-212.09 89,-186"/>
  109. </g>
  110. <!-- Q1&#45;&gt;Q1 -->
  111. <g id="edge4" class="edge">
  112. <title>Q1&#45;&gt;Q1</title>
  113. <path fill="none" stroke="black" d="M605.43,-352.88C618.51,-350.5 627.99,-342.37 627.99,-328.5 627.99,-314.63 618.51,-306.5 605.43,-304.12"/>
  114. <text text-anchor="middle" x="710.99" y="-324.8" font-family="Times,serif" font-size="14.00">NOT ((Q1.c1) IS NULL)</text>
  115. </g>
  116. <!-- boxhead4 -->
  117. <g id="node6" class="node">
  118. <title>boxhead4</title>
  119. <polygon fill="none" stroke="black" points="472,-39.5 472,-131.5 618,-131.5 618,-39.5 472,-39.5"/>
  120. <text text-anchor="middle" x="545" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  121. <polyline fill="none" stroke="black" points="472,-108.5 618,-108.5 "/>
  122. <text text-anchor="middle" x="545" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  123. <polyline fill="none" stroke="black" points="472,-85.5 618,-85.5 "/>
  124. <text text-anchor="middle" x="545" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  125. <polyline fill="none" stroke="black" points="472,-62.5 618,-62.5 "/>
  126. <text text-anchor="middle" x="545" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  127. </g>
  128. <!-- Q1&#45;&gt;boxhead4 -->
  129. <g id="edge7" class="edge">
  130. <title>Q1&#45;&gt;boxhead4</title>
  131. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M545,-263.23C545,-239.53 545,-212.09 545,-186"/>
  132. </g>
  133. <!-- Q3&#45;&gt;Q3 -->
  134. <g id="edge5" class="edge">
  135. <title>Q3&#45;&gt;Q3</title>
  136. <path fill="none" stroke="black" d="M937.43,-352.88C950.51,-350.5 959.99,-342.37 959.99,-328.5 959.99,-314.63 950.51,-306.5 937.43,-304.12"/>
  137. <text text-anchor="middle" x="1042.99" y="-324.8" font-family="Times,serif" font-size="14.00">NOT ((Q3.c0) IS NULL)</text>
  138. </g>
  139. <!-- boxhead5 -->
  140. <g id="node5" class="node">
  141. <title>boxhead5</title>
  142. <polygon fill="none" stroke="black" points="804,-39.5 804,-131.5 950,-131.5 950,-39.5 804,-39.5"/>
  143. <text text-anchor="middle" x="877" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  144. <polyline fill="none" stroke="black" points="804,-108.5 950,-108.5 "/>
  145. <text text-anchor="middle" x="877" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  146. <polyline fill="none" stroke="black" points="804,-85.5 950,-85.5 "/>
  147. <text text-anchor="middle" x="877" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  148. <polyline fill="none" stroke="black" points="804,-62.5 950,-62.5 "/>
  149. <text text-anchor="middle" x="877" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  150. </g>
  151. <!-- Q3&#45;&gt;boxhead5 -->
  152. <g id="edge8" class="edge">
  153. <title>Q3&#45;&gt;boxhead5</title>
  154. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M877,-263.23C877,-239.53 877,-212.09 877,-186"/>
  155. </g>
  156. </g>
  157. </svg>