@@ -62,25 +62,28 @@ SELECT str AS result
6262FROM expln('
6363SELECT x1,y1 FROM A LEFT JOIN b ON A.x1 = B.y1 WHERE x1 = 5 AND x2 = 5;') AS str
6464WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%' and str NOT LIKE '%Sort Method%';
65- result
66- --------------------------------------------------------
67- Nested Loop Left Join (actual rows=10000 loops=1)
65+ result
66+ ------------------------------------------------------------
67+ Hash Left Join (actual rows=10000 loops=1)
6868 AQO not used
6969 Output: a.x1, b.y1
70+ Hash Cond: (a.x1 = b.y1)
7071 -> Seq Scan on public.a (actual rows=100 loops=1)
7172 AQO: rows=100, error=0%
7273 Output: a.x1, a.x2, a.x3
7374 Filter: ((a.x1 = 5) AND (a.x2 = 5))
7475 Rows Removed by Filter: 900
75- -> Seq Scan on public.b (actual rows=100 loops=100)
76- AQO: rows=100, error=0%
77- Output: b.y1, b.y2, b.y3
78- Filter: (b.y1 = 5)
79- Rows Removed by Filter: 900
76+ -> Hash (actual rows=100 loops=1)
77+ Output: b.y1
78+ -> Seq Scan on public.b (actual rows=100 loops=1)
79+ AQO: rows=100, error=0%
80+ Output: b.y1
81+ Filter: (b.y1 = 5)
82+ Rows Removed by Filter: 900
8083 Using aqo: true
8184 AQO mode: LEARN
8285 JOINS: 0
83- (16 rows)
86+ (19 rows)
8487
8588SELECT str AS result
8689FROM expln('
@@ -519,29 +522,29 @@ SELECT str AS result
519522FROM expln('
520523SELECT * FROM (A LEFT JOIN B ON A.x1 = B.y1) sc left join C on sc.x1=C.z1;') AS str
521524WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%' and str NOT LIKE '%Sort Method%';
522- result
523- -------------------------------------------------------------------
524- HashLeft Join (actual rows=10000000 loops=1)
525- AQO not used
525+ result
526+ -------------------------------------------------------------------------
527+ HashRight Join (actual rows=10000000 loops=1)
528+ AQO: rows=1, error=-999999900%
526529 Output: a.x1, a.x2, a.x3, b.y1, b.y2, b.y3, c.z1, c.z2, c.z3
527- Hash Cond: (a.x1 =c.z1 )
528- ->Hash Left Join (actual rows=100000 loops=1)
529- AQO not used
530- Output:a.x1, a.x2, a.x3, b.y1, b.y2, b.y3
531- HashCond: (a.x1 = b.y1 )
532- -> Seq Scan on public.a (actual rows=1000 loops=1)
533- AQO: rows=1000, error=0%
534- Output: a.x1, a.x2, a.x3
535- -> Hash (actual rows=1000 loops=1)
536- Output: b.y1, b.y2, b.y3
537- -> Seq Scan on public.b (actual rows=1000 loops=1)
530+ Hash Cond: (b.y1 =a.x1 )
531+ ->Seq Scan on public.b (actual rows=1000 loops=1)
532+ AQO: rows=1000, error=0%
533+ Output: b.y1, b.y2, b.y3
534+ -> Hash(actual rows=100000 loops=1 )
535+ Output: a.x1, a.x2, a.x3, c.z1, c.z2, c.z3
536+ -> Hash Left Join (actual rows=100000 loops=1)
537+ AQO: rows=1, error=-9999900%
538+ Output: a.x1, a.x2, a.x3, c.z1, c.z2, c.z3
539+ Hash Cond: (a.x1 = c.z1)
540+ -> Seq Scan on public.a (actual rows=1000 loops=1)
538541 AQO: rows=1000, error=0%
539- Output:b.y1, b.y2, b.y3
540- -> Hash (actual rows=1000 loops=1)
541- Output: c.z1, c.z2, c.z3
542- -> Seq Scan on public.c (actual rows=1000 loops=1)
543- AQO: rows=1000, error=0%
544- Output: c.z1, c.z2, c.z3
542+ Output:a.x1, a.x2, a.x3
543+ -> Hash (actual rows=1000 loops=1)
544+ Output: c.z1, c.z2, c.z3
545+ -> Seq Scan on public.c (actual rows=1000 loops=1)
546+ AQO: rows=1000, error=0%
547+ Output: c.z1, c.z2, c.z3
545548 Using aqo: true
546549 AQO mode: LEARN
547550 JOINS: 1