Jeff Janes <jeff.janes@xxxxxxxxx> writes: > The trivial answer to "why" is that it thinks that the vast majority > of the 33914 rows from the hash join will find no partners in r, but > in fact each has about 10 partner in r. Why does it think that? I'm wondering if maybe the vast majority of the rows indeed have no join partners, but there are a small number with a large number of partners. The statistics might miss these, if so. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance