Re: PG choosing nested loop for set membership? - Mailing list pgsql-general

From Tom Lane
Subject Re: PG choosing nested loop for set membership?
Date
Msg-id 31260.1395781637@sss.pgh.pa.us
Whole thread Raw
In response to PG choosing nested loop for set membership?  (Brian Crowell <brian@fluggo.com>)
Responses Re: PG choosing nested loop for set membership?  (Brian Crowell <brian@fluggo.com>)
List pgsql-general
Brian Crowell <brian@fluggo.com> writes:
> The trouble comes when enforcing the "dci.account in (...)" search
> condition: pl2.visible_accounts is a view that determines which
> accounts the current user can see, which, depending on who you are,
> can be several hundred or none at all. Postgres estimates the output
> of this query as two rows, but in my case, it's actually 240.

So the main estimation error is inside that view, which you didn't
show us :-(

            regards, tom lane


pgsql-general by date:

Previous
From: Brian Crowell
Date:
Subject: PG choosing nested loop for set membership?
Next
From: David Johnston
Date:
Subject: Re: PG choosing nested loop for set membership?