Postgres User writes:
> Why is cost_hashjoin estimating 50 billion tuple comparisons for 10K rows of
> output though?
Well, if it hashes the smaller table, there's 100 million rows on the
outside, and each of them will probe one hash chain in the hash table.
If you're unlucky, each of those prob
Why is cost_hashjoin estimating 50 billion tuple comparisons for 10K rows of
output though?
From: Tom Lane
To: postgresu...@yahoo.com
Cc: pgsql-bugs@postgresql.org
Sent: Wednesday, May 30, 2012 10:03 PM
Subject: Re: [BUGS] BUG #6668: hashjoin cost problem
postgresu...@yahoo.com writes:
> create table small(i) as select (g/1000) * 1000 from
> generate_series(1,1) g;
> create table large(i) as select generate_series(1,1);
> It doesn't matter how big the big table is... for this distribution large
> table is hashed.
I don't think that's w
The following bug has been logged on the website:
Bug reference: 6668
Logged by: Postgres User
Email address: postgresu...@yahoo.com
PostgreSQL version: 9.1.3
Operating system: Ubuntu
Description:
work_mem 1MB
create table small(i) as select (g/1000) * 1000 from
gen