simple-exists.svg 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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="624pt" height="569pt"
  8. viewBox="0.00 0.00 624.00 568.98" 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 564.98)">
  10. <title>G</title>
  11. <polygon fill="white" stroke="transparent" points="-4,4 -4,-564.98 620,-564.98 620,4 -4,4"/>
  12. <text text-anchor="middle" x="308" y="-7.8" font-family="Times,serif" font-size="14.00">select * from t1 where exists(select * from t2 where t2.f1 = t1.f1); (before rewrites)</text>
  13. <g id="clust1" class="cluster">
  14. <title>cluster0</title>
  15. <polygon fill="none" stroke="black" points="68,-383.99 68,-552.98 583,-552.98 583,-383.99 68,-383.99"/>
  16. <text text-anchor="middle" x="118.5" y="-537.78" font-family="Times,serif" font-size="14.00">Box0:Select</text>
  17. </g>
  18. <g id="clust3" class="cluster">
  19. <title>cluster2</title>
  20. <polygon fill="none" stroke="black" points="33,-182 33,-350.99 343,-350.99 343,-182 33,-182"/>
  21. <text text-anchor="middle" x="83.5" y="-335.79" font-family="Times,serif" font-size="14.00">Box2:Select</text>
  22. </g>
  23. <g id="clust5" class="cluster">
  24. <title>cluster3</title>
  25. <polygon fill="none" stroke="black" points="189,-31 189,-163 351,-163 351,-31 189,-31"/>
  26. <text text-anchor="middle" x="265" y="-147.8" font-family="Times,serif" font-size="14.00">Box3:BaseTable T2</text>
  27. </g>
  28. <g id="clust7" class="cluster">
  29. <title>cluster1</title>
  30. <polygon fill="none" stroke="black" points="351,-200.49 351,-332.49 513,-332.49 513,-200.49 351,-200.49"/>
  31. <text text-anchor="middle" x="427" y="-317.29" font-family="Times,serif" font-size="14.00">Box1:BaseTable T1</text>
  32. </g>
  33. <!-- boxhead0 -->
  34. <g id="node1" class="node">
  35. <title>boxhead0</title>
  36. <polygon fill="none" stroke="black" points="429,-410.98 429,-502.98 575,-502.98 575,-410.98 429,-410.98"/>
  37. <text text-anchor="middle" x="502" y="-487.78" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  38. <polyline fill="none" stroke="black" points="429,-479.98 575,-479.98 "/>
  39. <text text-anchor="middle" x="502" y="-464.78" font-family="Times,serif" font-size="14.00">0: Q0.c0 as F1</text>
  40. <polyline fill="none" stroke="black" points="429,-456.98 575,-456.98 "/>
  41. <text text-anchor="middle" x="502" y="-441.78" font-family="Times,serif" font-size="14.00">1: Q0.c1 as F2</text>
  42. <polyline fill="none" stroke="black" points="429,-433.98 575,-433.98 "/>
  43. <text text-anchor="middle" x="502" y="-418.78" font-family="Times,serif" font-size="14.00">2: Q0.c2 as F3</text>
  44. </g>
  45. <!-- Q0 -->
  46. <g id="node2" class="node">
  47. <title>Q0</title>
  48. <ellipse fill="none" stroke="black" cx="346" cy="-456.98" rx="64.99" ry="64.99"/>
  49. <text text-anchor="middle" x="346" y="-453.28" font-family="Times,serif" font-size="14.00">Q0(F) as T1</text>
  50. </g>
  51. <!-- Q1 -->
  52. <g id="node5" class="node">
  53. <title>Q1</title>
  54. <ellipse fill="none" stroke="black" cx="270" cy="-254.99" rx="64.99" ry="64.99"/>
  55. <text text-anchor="middle" x="270" y="-251.29" font-family="Times,serif" font-size="14.00">Q1(F) as T2</text>
  56. </g>
  57. <!-- Q0&#45;&gt;Q1 -->
  58. <g id="edge2" class="edge">
  59. <title>Q0&#45;&gt;Q1</title>
  60. <path fill="none" stroke="black" d="M304.79,-406.61C297.9,-396.34 291.53,-385.21 287,-373.99 280.19,-357.1 276.05,-337.88 273.55,-319.92"/>
  61. <text text-anchor="middle" x="349.5" y="-362.79" font-family="Times,serif" font-size="14.00">(Q1.c0) = (Q0.c0)</text>
  62. </g>
  63. <!-- boxhead1 -->
  64. <g id="node7" class="node">
  65. <title>boxhead1</title>
  66. <polygon fill="none" stroke="black" points="359,-208.99 359,-300.99 505,-300.99 505,-208.99 359,-208.99"/>
  67. <text text-anchor="middle" x="432" y="-285.79" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  68. <polyline fill="none" stroke="black" points="359,-277.99 505,-277.99 "/>
  69. <text text-anchor="middle" x="432" y="-262.79" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  70. <polyline fill="none" stroke="black" points="359,-254.99 505,-254.99 "/>
  71. <text text-anchor="middle" x="432" y="-239.79" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  72. <polyline fill="none" stroke="black" points="359,-231.99 505,-231.99 "/>
  73. <text text-anchor="middle" x="432" y="-216.79" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  74. </g>
  75. <!-- Q0&#45;&gt;boxhead1 -->
  76. <g id="edge3" class="edge">
  77. <title>Q0&#45;&gt;boxhead1</title>
  78. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M390.23,-409.28C398.6,-398.37 406.45,-386.32 412,-373.99 417.81,-361.07 421.95,-346.67 424.88,-332.49"/>
  79. </g>
  80. <!-- Q2 -->
  81. <g id="node3" class="node">
  82. <title>Q2</title>
  83. <ellipse fill="none" stroke="black" cx="114" cy="-456.98" rx="37.89" ry="37.89"/>
  84. <text text-anchor="middle" x="114" y="-453.28" font-family="Times,serif" font-size="14.00">Q2(E)</text>
  85. </g>
  86. <!-- Q2&#45;&gt;Q2 -->
  87. <g id="edge1" class="edge">
  88. <title>Q2&#45;&gt;Q2</title>
  89. <path fill="none" stroke="black" d="M147.99,-473.85C159.97,-474.12 169.7,-468.5 169.7,-456.98 169.7,-445.47 159.97,-439.85 147.99,-440.12"/>
  90. <text text-anchor="middle" x="216.2" y="-453.28" font-family="Times,serif" font-size="14.00">(1) = (Q2.c0)</text>
  91. </g>
  92. <!-- boxhead2 -->
  93. <g id="node4" class="node">
  94. <title>boxhead2</title>
  95. <polygon fill="none" stroke="black" points="41,-231.99 41,-277.99 187,-277.99 187,-231.99 41,-231.99"/>
  96. <text text-anchor="middle" x="114" y="-262.79" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  97. <polyline fill="none" stroke="black" points="41,-254.99 187,-254.99 "/>
  98. <text text-anchor="middle" x="114" y="-239.79" font-family="Times,serif" font-size="14.00">0: 1</text>
  99. </g>
  100. <!-- Q2&#45;&gt;boxhead2 -->
  101. <g id="edge4" class="edge">
  102. <title>Q2&#45;&gt;boxhead2</title>
  103. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M114,-418.84C114,-399.58 114,-375.09 114,-350.99"/>
  104. </g>
  105. <!-- boxhead3 -->
  106. <g id="node6" class="node">
  107. <title>boxhead3</title>
  108. <polygon fill="none" stroke="black" points="197,-39.5 197,-131.5 343,-131.5 343,-39.5 197,-39.5"/>
  109. <text text-anchor="middle" x="270" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  110. <polyline fill="none" stroke="black" points="197,-108.5 343,-108.5 "/>
  111. <text text-anchor="middle" x="270" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  112. <polyline fill="none" stroke="black" points="197,-85.5 343,-85.5 "/>
  113. <text text-anchor="middle" x="270" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  114. <polyline fill="none" stroke="black" points="197,-62.5 343,-62.5 "/>
  115. <text text-anchor="middle" x="270" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  116. </g>
  117. <!-- Q1&#45;&gt;boxhead3 -->
  118. <g id="edge5" class="edge">
  119. <title>Q1&#45;&gt;boxhead3</title>
  120. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M270,-189.72C270,-180.97 270,-171.93 270,-163"/>
  121. </g>
  122. </g>
  123. </svg>