simple-cte-after-normalization.svg 5.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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="919pt" height="399pt"
  8. viewBox="0.00 0.00 919.00 399.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 395)">
  10. <title>G</title>
  11. <polygon fill="white" stroke="transparent" points="-4,4 -4,-395 915,-395 915,4 -4,4"/>
  12. <text text-anchor="middle" x="382" y="-7.8" font-family="Times,serif" font-size="14.00">with a(a, b, c) as (select * from t1) select * from a as a1 inner join a as a2 on a1.a = a2.c; (after rewrites)</text>
  13. <g id="clust1" class="cluster">
  14. <title>cluster3</title>
  15. <polygon fill="none" stroke="black" points="8,-182 8,-383 903,-383 903,-182 8,-182"/>
  16. <text text-anchor="middle" x="58.5" y="-367.8" font-family="Times,serif" font-size="14.00">Box3:Select</text>
  17. </g>
  18. <g id="clust3" class="cluster">
  19. <title>cluster1</title>
  20. <polygon fill="none" stroke="black" points="14,-31 14,-163 176,-163 176,-31 14,-31"/>
  21. <text text-anchor="middle" x="90" y="-147.8" font-family="Times,serif" font-size="14.00">Box1:BaseTable T1</text>
  22. </g>
  23. <!-- boxhead3 -->
  24. <g id="node1" class="node">
  25. <title>boxhead3</title>
  26. <polygon fill="none" stroke="black" points="749,-190.5 749,-351.5 895,-351.5 895,-190.5 749,-190.5"/>
  27. <text text-anchor="middle" x="822" y="-336.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  28. <polyline fill="none" stroke="black" points="749,-328.5 895,-328.5 "/>
  29. <text text-anchor="middle" x="822" y="-313.3" font-family="Times,serif" font-size="14.00">0: Q5.c0 as A</text>
  30. <polyline fill="none" stroke="black" points="749,-305.5 895,-305.5 "/>
  31. <text text-anchor="middle" x="822" y="-290.3" font-family="Times,serif" font-size="14.00">1: Q5.c1 as B</text>
  32. <polyline fill="none" stroke="black" points="749,-282.5 895,-282.5 "/>
  33. <text text-anchor="middle" x="822" y="-267.3" font-family="Times,serif" font-size="14.00">2: Q5.c2 as C</text>
  34. <polyline fill="none" stroke="black" points="749,-259.5 895,-259.5 "/>
  35. <text text-anchor="middle" x="822" y="-244.3" font-family="Times,serif" font-size="14.00">3: Q0.c0 as A</text>
  36. <polyline fill="none" stroke="black" points="749,-236.5 895,-236.5 "/>
  37. <text text-anchor="middle" x="822" y="-221.3" font-family="Times,serif" font-size="14.00">4: Q0.c1 as B</text>
  38. <polyline fill="none" stroke="black" points="749,-213.5 895,-213.5 "/>
  39. <text text-anchor="middle" x="822" y="-198.3" font-family="Times,serif" font-size="14.00">5: Q0.c2 as C</text>
  40. </g>
  41. <!-- Q0 -->
  42. <g id="node2" class="node">
  43. <title>Q0</title>
  44. <ellipse fill="none" stroke="black" cx="81" cy="-271" rx="64.99" ry="64.99"/>
  45. <text text-anchor="middle" x="81" y="-267.3" font-family="Times,serif" font-size="14.00">Q0(F) as T1</text>
  46. </g>
  47. <!-- Q0&#45;&gt;Q0 -->
  48. <g id="edge2" class="edge">
  49. <title>Q0&#45;&gt;Q0</title>
  50. <path fill="none" stroke="black" d="M143.61,-288.5C155.55,-286.4 163.99,-280.57 163.99,-271 163.99,-261.43 155.55,-255.6 143.61,-253.5"/>
  51. <text text-anchor="middle" x="246.99" y="-267.3" font-family="Times,serif" font-size="14.00">NOT ((Q0.c2) IS NULL)</text>
  52. </g>
  53. <!-- Q5 -->
  54. <g id="node3" class="node">
  55. <title>Q5</title>
  56. <ellipse fill="none" stroke="black" cx="510" cy="-271" rx="37.09" ry="37.09"/>
  57. <text text-anchor="middle" x="510" y="-267.3" font-family="Times,serif" font-size="14.00">Q5(F)</text>
  58. </g>
  59. <!-- Q0&#45;&gt;Q5 -->
  60. <g id="edge1" class="edge">
  61. <title>Q0&#45;&gt;Q5</title>
  62. <path fill="none" stroke="black" d="M146.16,-271C237.34,-271 399.99,-271 472.88,-271"/>
  63. <text text-anchor="middle" x="309.47" y="-277.8" font-family="Times,serif" font-size="14.00">(Q0.c2) = (Q5.c0)</text>
  64. </g>
  65. <!-- boxhead1 -->
  66. <g id="node4" class="node">
  67. <title>boxhead1</title>
  68. <polygon fill="none" stroke="black" points="22,-39.5 22,-131.5 168,-131.5 168,-39.5 22,-39.5"/>
  69. <text text-anchor="middle" x="95" y="-116.3" font-family="Times,serif" font-size="14.00">Distinct: Preserve</text>
  70. <polyline fill="none" stroke="black" points="22,-108.5 168,-108.5 "/>
  71. <text text-anchor="middle" x="95" y="-93.3" font-family="Times,serif" font-size="14.00">0: c0 as F1</text>
  72. <polyline fill="none" stroke="black" points="22,-85.5 168,-85.5 "/>
  73. <text text-anchor="middle" x="95" y="-70.3" font-family="Times,serif" font-size="14.00">1: c1 as F2</text>
  74. <polyline fill="none" stroke="black" points="22,-62.5 168,-62.5 "/>
  75. <text text-anchor="middle" x="95" y="-47.3" font-family="Times,serif" font-size="14.00">2: c2 as F3</text>
  76. </g>
  77. <!-- Q0&#45;&gt;boxhead1 -->
  78. <g id="edge4" class="edge">
  79. <title>Q0&#45;&gt;boxhead1</title>
  80. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M85.88,-206.08C86.94,-192.18 88.07,-177.33 89.16,-163"/>
  81. </g>
  82. <!-- Q5&#45;&gt;Q5 -->
  83. <g id="edge3" class="edge">
  84. <title>Q5&#45;&gt;Q5</title>
  85. <path fill="none" stroke="black" d="M542.23,-289.3C554.69,-290.12 565.05,-284.02 565.05,-271 565.05,-257.98 554.69,-251.88 542.23,-252.7"/>
  86. <text text-anchor="middle" x="648.05" y="-267.3" font-family="Times,serif" font-size="14.00">NOT ((Q5.c0) IS NULL)</text>
  87. </g>
  88. <!-- Q5&#45;&gt;boxhead1 -->
  89. <g id="edge5" class="edge">
  90. <title>Q5&#45;&gt;boxhead1</title>
  91. <path fill="none" stroke="black" stroke-dasharray="5,2" d="M478.02,-252.29C444.02,-233.77 388.45,-204.33 339,-182 285.49,-157.83 223.91,-133.76 176,-115.83"/>
  92. </g>
  93. </g>
  94. </svg>