|
1 | 1 | CREATE EXTENSION aqo;
|
2 | 2 | SELECT true FROM aqo_reset();
|
3 |
| - ?column? |
4 |
| ----------- |
| 3 | + bool |
| 4 | +------ |
5 | 5 | t
|
6 | 6 | (1 row)
|
7 | 7 |
|
@@ -62,25 +62,28 @@ SELECT str AS result
|
62 | 62 | FROM expln('
|
63 | 63 | SELECT x1,y1 FROM A LEFT JOIN b ON A.x1 = B.y1 WHERE x1 = 5 AND x2 = 5;') AS str
|
64 | 64 | 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) |
68 | 68 | AQO not used
|
69 | 69 | Output: a.x1, b.y1
|
| 70 | + Hash Cond: (a.x1 = b.y1) |
70 | 71 | -> Seq Scan on public.a (actual rows=100 loops=1)
|
71 | 72 | AQO: rows=100, error=0%
|
72 | 73 | Output: a.x1, a.x2, a.x3
|
73 | 74 | Filter: ((a.x1 = 5) AND (a.x2 = 5))
|
74 | 75 | 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 |
80 | 83 | Using aqo: true
|
81 | 84 | AQO mode: LEARN
|
82 | 85 | JOINS: 0
|
83 |
| -(16 rows) |
| 86 | +(19 rows) |
84 | 87 |
|
85 | 88 | SELECT str AS result
|
86 | 89 | FROM expln('
|
@@ -519,29 +522,29 @@ SELECT str AS result
|
519 | 522 | FROM expln('
|
520 | 523 | SELECT * FROM (A LEFT JOIN B ON A.x1 = B.y1) sc left join C on sc.x1=C.z1;') AS str
|
521 | 524 | 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% |
526 | 529 | 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) |
538 | 541 | 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 |
545 | 548 | Using aqo: true
|
546 | 549 | AQO mode: LEARN
|
547 | 550 | JOINS: 1
|
|
0 commit comments