Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong node name for "Hash join" #116

Closed
ioguix opened this issue Nov 25, 2019 · 0 comments · Fixed by #117
Closed

Wrong node name for "Hash join" #116

ioguix opened this issue Nov 25, 2019 · 0 comments · Fixed by #117

Comments

@ioguix
Copy link
Member

ioguix commented Nov 25, 2019

Hello,

Considering this query:

DROP TABLE IF EXISTS bebe, ahah;

CREATE TABLE ahah (c1 serial PRIMARY KEY, c2 integer);
INSERT INTO ahah (c2) SELECT generate_series(2000, 3000);

CREATE TABLE bebe (c1 serial PRIMARY KEY, c2 integer);
INSERT INTO bebe (c2) SELECT generate_series(2000, 3000);
ANALYZE;

EXPLAIN (ANALYZE, BUFFERS, COSTS OFF)
SELECT ahah.c1, max(ahah.c2), max(bebe.c2)
FROM bebe
JOIN ahah
ON bebe.c1 = ahah.c1
GROUP BY ahah.c1;

Here is the plan:

 HashAggregate (actual time=6.004..7.028 rows=1001 loops=1)
   Group Key: ahah.c1
   Buffers: shared hit=10
   ->  Hash Join (actual time=1.626..4.086 rows=1001 loops=1)
         Hash Cond: (bebe.c1 = ahah.c1)
         Buffers: shared hit=10
         ->  Seq Scan on bebe (actual time=0.039..0.502 rows=1001 loops=1)
               Buffers: shared hit=5
         ->  Hash (actual time=1.558..1.559 rows=1001 loops=1)
               Buckets: 1024  Batches: 1  Memory Usage: 48kB
               Buffers: shared hit=5
               ->  Seq Scan on ahah (actual time=0.029..0.508 rows=1001 loops=1)
                     Buffers: shared hit=5
 Planning Time: 1.497 ms
 Execution Time: 7.490 ms

Pev2 shows "Hash" instead of "Hash Join".

pgiraud added a commit that referenced this issue Nov 25, 2019
pgiraud added a commit that referenced this issue Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant