simple-in-select.svg 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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="614pt" height="555pt"
  8. viewBox="0.00 0.00 614.00 554.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 550.98)">
  10. <title>G</title>
  11. <polygon fill="white" stroke="transparent" points="-4,4 -4,-550.98 610,-550.98 610,4 -4,4"/>
  12. <text text-anchor="middle" x="238" y="-7.8" font-family="Times,serif" font-size="14.00">select * from t1 where f1 in (select f1 from t2); (before rewrites)</text>
  13. <g id="clust1" class="cluster">
  14. <title>cluster0</title>
  15. <polygon fill="none" stroke="black" points="70,-369.99 70,-538.98 598,-538.98 598,-369.99 70,-369.99"/>
  16. <text text-anchor="middle" x="120.5" y="-523.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="178,-182 178,-350.99 488,-350.99 488,-182 178,-182"/>
  21. <text text-anchor="middle" x="228.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="170,-31 170,-163 332,-163 332,-31 170,-31"/>
  26. <text text-anchor="middle" x="246" 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="8,-200.49 8,-332.49 170,-332.49 170,-200.49 8,-200.49"/>
  31. <text text-anchor="middle" x="84" 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="444,-396.98 444,-488.98 590,-488.98 590,-396.98 444,-396.98"/>
  37. <text text-anchor="middle" x="517" y="-473.78" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  38. <polyline fill="none" stroke="black" points="444,-465.98 590,-465.98 "/>
  39. <text text-anchor="middle" x="517" y="-450.78" font-family="Times,serif" font-size="14.00">0: Q0.c0 as F1</text>
  40. <polyline fill="none" stroke="black" points="444,-442.98 590,-442.98 "/>
  41. <text text-anchor="middle" x="517" y="-427.78" font-family="Times,serif" font-size="14.00">1: Q0.c1 as F2</text>
  42. <polyline fill="none" stroke="black" points="444,-419.98 590,-419.98 "/>
  43. <text text-anchor="middle" x="517" y="-404.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="143" cy="-442.98" rx="64.99" ry="64.99"/>
  49. <text text-anchor="middle" x="143" y="-439.28" font-family="Times,serif" font-size="14.00">Q0(F) as T1</text>
  50. </g>
  51. <!-- Q2 -->
  52. <g id="node3" class="node">
  53. <title>Q2</title>
  54. <ellipse fill="none" stroke="black" cx="388" cy="-442.98" rx="37.89" ry="37.89"/>
  55. <text text-anchor="middle" x="388" y="-439.28" font-family="Times,serif" font-size="14.00">Q2(E)</text>
  56. </g>
  57. <!-- Q0&#45;&gt;Q2 -->
  58. <g id="edge1" class="edge">
  59. <title>Q0&#45;&gt;Q2</title>
  60. <path fill="none" stroke="black" d="M208.01,-442.98C253.38,-442.98 312.34,-442.98 350.19,-442.98"/>
  61. <text text-anchor="middle" x="279.15" y="-449.78" font-family="Times,serif" font-size="14.00">(Q0.c0) = (Q2.c0)</text>
  62. </g>
  63. <!-- boxhead1 -->
  64. <g id="node7" class="node">
  65. <title>boxhead1</title>
  66. <polygon fill="none" stroke="black" points="16,-208.99 16,-300.99 162,-300.99 162,-208.99 16,-208.99"/>
  67. <text text-anchor="middle" x="89" y="-285.79" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  68. <polyline fill="none" stroke="black" points="16,-277.99 162,-277.99 "/>
  69. <text text-anchor="middle" x="89" y="-262.79" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  70. <polyline fill="none" stroke="black" points="16,-254.99 162,-254.99 "/>
  71. <text text-anchor="middle" x="89" y="-239.79" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  72. <polyline fill="none" stroke="black" points="16,-231.99 162,-231.99 "/>
  73. <text text-anchor="middle" x="89" 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="edge2" class="edge">
  77. <title>Q0&#45;&gt;boxhead1</title>
  78. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M125.09,-380.31C120.65,-365 115.83,-348.42 111.21,-332.49"/>
  79. </g>
  80. <!-- boxhead2 -->
  81. <g id="node4" class="node">
  82. <title>boxhead2</title>
  83. <polygon fill="none" stroke="black" points="334,-231.99 334,-277.99 480,-277.99 480,-231.99 334,-231.99"/>
  84. <text text-anchor="middle" x="407" y="-262.79" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  85. <polyline fill="none" stroke="black" points="334,-254.99 480,-254.99 "/>
  86. <text text-anchor="middle" x="407" y="-239.79" font-family="Times,serif" font-size="14.00">0: Q1.c0 as F1</text>
  87. </g>
  88. <!-- Q2&#45;&gt;boxhead2 -->
  89. <g id="edge3" class="edge">
  90. <title>Q2&#45;&gt;boxhead2</title>
  91. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M391.75,-405.24C393.36,-389.49 395.32,-370.3 397.3,-350.99"/>
  92. </g>
  93. <!-- Q1 -->
  94. <g id="node5" class="node">
  95. <title>Q1</title>
  96. <ellipse fill="none" stroke="black" cx="251" cy="-254.99" rx="64.99" ry="64.99"/>
  97. <text text-anchor="middle" x="251" y="-251.29" font-family="Times,serif" font-size="14.00">Q1(F) as T2</text>
  98. </g>
  99. <!-- boxhead3 -->
  100. <g id="node6" class="node">
  101. <title>boxhead3</title>
  102. <polygon fill="none" stroke="black" points="178,-39.5 178,-131.5 324,-131.5 324,-39.5 178,-39.5"/>
  103. <text text-anchor="middle" x="251" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  104. <polyline fill="none" stroke="black" points="178,-108.5 324,-108.5 "/>
  105. <text text-anchor="middle" x="251" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  106. <polyline fill="none" stroke="black" points="178,-85.5 324,-85.5 "/>
  107. <text text-anchor="middle" x="251" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  108. <polyline fill="none" stroke="black" points="178,-62.5 324,-62.5 "/>
  109. <text text-anchor="middle" x="251" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  110. </g>
  111. <!-- Q1&#45;&gt;boxhead3 -->
  112. <g id="edge4" class="edge">
  113. <title>Q1&#45;&gt;boxhead3</title>
  114. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M251,-189.72C251,-180.97 251,-171.93 251,-163"/>
  115. </g>
  116. </g>
  117. </svg>