subquery-any.svg 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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="621pt" height="511pt"
  8. viewBox="0.00 0.00 621.00 511.18" 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 507.18)">
  10. <title>G</title>
  11. <polygon fill="white" stroke="transparent" points="-4,4 -4,-507.18 617,-507.18 617,4 -4,4"/>
  12. <text text-anchor="middle" x="245.5" y="-7.8" font-family="Times,serif" font-size="14.00">select * from a where a &gt;= ANY(select c from c); (before rewrites)</text>
  13. <g id="clust1" class="cluster">
  14. <title>cluster0</title>
  15. <polygon fill="none" stroke="black" points="55,-336.59 55,-495.18 605,-495.18 605,-336.59 55,-336.59"/>
  16. <text text-anchor="middle" x="105.5" y="-479.98" 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,-159 178,-317.59 478,-317.59 478,-159 178,-159"/>
  21. <text text-anchor="middle" x="228.5" y="-302.39" 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="165,-31 165,-140 327,-140 327,-31 165,-31"/>
  26. <text text-anchor="middle" x="237.5" y="-124.8" font-family="Times,serif" font-size="14.00">Box3:BaseTable C</text>
  27. </g>
  28. <g id="clust7" class="cluster">
  29. <title>cluster1</title>
  30. <polygon fill="none" stroke="black" points="8,-183.79 8,-292.79 170,-292.79 170,-183.79 8,-183.79"/>
  31. <text text-anchor="middle" x="80" y="-277.59" font-family="Times,serif" font-size="14.00">Box1:BaseTable A</text>
  32. </g>
  33. <!-- boxhead0 -->
  34. <g id="node1" class="node">
  35. <title>boxhead0</title>
  36. <polygon fill="none" stroke="black" points="451,-369.88 451,-438.88 597,-438.88 597,-369.88 451,-369.88"/>
  37. <text text-anchor="middle" x="524" y="-423.68" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  38. <polyline fill="none" stroke="black" points="451,-415.88 597,-415.88 "/>
  39. <text text-anchor="middle" x="524" y="-400.68" font-family="Times,serif" font-size="14.00">0: Q0.c0 as A</text>
  40. <polyline fill="none" stroke="black" points="451,-392.88 597,-392.88 "/>
  41. <text text-anchor="middle" x="524" y="-377.68" font-family="Times,serif" font-size="14.00">1: Q0.c1 as B</text>
  42. </g>
  43. <!-- Q0 -->
  44. <g id="node2" class="node">
  45. <title>Q0</title>
  46. <ellipse fill="none" stroke="black" cx="123" cy="-404.38" rx="59.59" ry="59.59"/>
  47. <text text-anchor="middle" x="123" y="-400.68" font-family="Times,serif" font-size="14.00">Q0(F) as A</text>
  48. </g>
  49. <!-- Q2 -->
  50. <g id="node3" class="node">
  51. <title>Q2</title>
  52. <ellipse fill="none" stroke="black" cx="385" cy="-404.38" rx="48.19" ry="48.19"/>
  53. <text text-anchor="middle" x="385" y="-400.68" font-family="Times,serif" font-size="14.00">Q2(Any)</text>
  54. </g>
  55. <!-- Q0&#45;&gt;Q2 -->
  56. <g id="edge1" class="edge">
  57. <title>Q0&#45;&gt;Q2</title>
  58. <path fill="none" stroke="black" d="M183.11,-404.38C229.64,-404.38 293.25,-404.38 336.55,-404.38"/>
  59. <text text-anchor="middle" x="259.85" y="-411.18" font-family="Times,serif" font-size="14.00">(Q0.c0) &gt;= (Q2.c0)</text>
  60. </g>
  61. <!-- boxhead1 -->
  62. <g id="node7" class="node">
  63. <title>boxhead1</title>
  64. <polygon fill="none" stroke="black" points="16,-192.29 16,-261.29 162,-261.29 162,-192.29 16,-192.29"/>
  65. <text text-anchor="middle" x="89" y="-246.09" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  66. <polyline fill="none" stroke="black" points="16,-238.29 162,-238.29 "/>
  67. <text text-anchor="middle" x="89" y="-223.09" font-family="Times,serif" font-size="14.00">0: c0 as A</text>
  68. <polyline fill="none" stroke="black" points="16,-215.29 162,-215.29 "/>
  69. <text text-anchor="middle" x="89" y="-200.09" font-family="Times,serif" font-size="14.00">1: c1 as B</text>
  70. </g>
  71. <!-- Q0&#45;&gt;boxhead1 -->
  72. <g id="edge2" class="edge">
  73. <title>Q0&#45;&gt;boxhead1</title>
  74. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M111.77,-345.4C108.51,-328.55 104.93,-310.04 101.59,-292.79"/>
  75. </g>
  76. <!-- boxhead2 -->
  77. <g id="node4" class="node">
  78. <title>boxhead2</title>
  79. <polygon fill="none" stroke="black" points="324,-203.79 324,-249.79 470,-249.79 470,-203.79 324,-203.79"/>
  80. <text text-anchor="middle" x="397" y="-234.59" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  81. <polyline fill="none" stroke="black" points="324,-226.79 470,-226.79 "/>
  82. <text text-anchor="middle" x="397" y="-211.59" font-family="Times,serif" font-size="14.00">0: Q1.c0 as C</text>
  83. </g>
  84. <!-- Q2&#45;&gt;boxhead2 -->
  85. <g id="edge3" class="edge">
  86. <title>Q2&#45;&gt;boxhead2</title>
  87. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M388.22,-356.33C389.04,-344.31 389.95,-330.98 390.86,-317.59"/>
  88. </g>
  89. <!-- Q1 -->
  90. <g id="node5" class="node">
  91. <title>Q1</title>
  92. <ellipse fill="none" stroke="black" cx="246" cy="-226.79" rx="59.59" ry="59.59"/>
  93. <text text-anchor="middle" x="246" y="-223.09" font-family="Times,serif" font-size="14.00">Q1(F) as C</text>
  94. </g>
  95. <!-- boxhead3 -->
  96. <g id="node6" class="node">
  97. <title>boxhead3</title>
  98. <polygon fill="none" stroke="black" points="173,-39.5 173,-108.5 319,-108.5 319,-39.5 173,-39.5"/>
  99. <text text-anchor="middle" x="246" y="-93.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  100. <polyline fill="none" stroke="black" points="173,-85.5 319,-85.5 "/>
  101. <text text-anchor="middle" x="246" y="-70.3" font-family="Times,serif" font-size="14.00">0: c0 as C</text>
  102. <polyline fill="none" stroke="black" points="173,-62.5 319,-62.5 "/>
  103. <text text-anchor="middle" x="246" y="-47.3" font-family="Times,serif" font-size="14.00">1: c1 as D</text>
  104. </g>
  105. <!-- Q1&#45;&gt;boxhead3 -->
  106. <g id="edge4" class="edge">
  107. <title>Q1&#45;&gt;boxhead3</title>
  108. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M246,-166.63C246,-157.89 246,-148.85 246,-140"/>
  109. </g>
  110. </g>
  111. </svg>