Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c3567f7

Browse files
committed
Arrange extension with subtle changes in the optimizer
1 parent c7f1857 commit c3567f7

File tree

2 files changed

+33
-32
lines changed

2 files changed

+33
-32
lines changed

expected/look_a_like.out

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,28 @@ SELECT str AS result
6262
FROM expln('
6363
SELECT x1,y1 FROM A LEFT JOIN b ON A.x1 = B.y1 WHERE x1 = 5 AND x2 = 5;') AS str
6464
WHERE 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

8588
SELECT str AS result
8689
FROM expln('
@@ -519,29 +522,29 @@ SELECT str AS result
519522
FROM expln('
520523
SELECT * FROM (A LEFT JOIN B ON A.x1 = B.y1) sc left join C on sc.x1=C.z1;') AS str
521524
WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%' and str NOT LIKE '%Sort Method%';
522-
result
523-
-------------------------------------------------------------------
524-
Hash Left Join (actual rows=10000000 loops=1)
525-
AQO not used
525+
result
526+
-------------------------------------------------------------------------
527+
Hash Right 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-
Hash Cond: (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

regress_schedule

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ test: plancache
1515
test: update_functions
1616
# Performance-dependent test. Can be ignored if executes in containers or on slow machines
1717
ignore: statement_timeout
18-
ignore: smart_statement_timeout
1918
test: statement_timeout
2019
test: temp_tables
2120
test: top_queries
2221
test: relocatable
2322
test: look_a_like
2423
test: feature_subspace
25-
test: smart_statement_timeout

0 commit comments

Comments
 (0)