Re: [PERFORM] Nested Loop join being improperly chosen

2008-08-28 Thread David Rowley
lf Of Brad Ediger Sent: 22 August 2008 16:26 To: pgsql-performance@postgresql.org Subject: [PERFORM] Nested Loop join being improperly chosen Hello, I'm having trouble with a Nested Loop being selected for a rather complex query; it turns out this is a pretty bad plan as the nested loop'

Re: [PERFORM] Nested Loop join being improperly chosen

2008-08-28 Thread Brad Ediger
On Aug 28, 2008, at 6:01 PM, David Rowley wrote: I had a similar problem here: http://archives.postgresql.org/pgsql-bugs/2008-07/msg00026.php Is the nested loop performing a LEFT join with yours? It's a little difficult to tell just from the query plan you showed. A work around for mine was to

[PERFORM] Nested Loop join being improperly chosen

2008-08-22 Thread Brad Ediger
Hello, I'm having trouble with a Nested Loop being selected for a rather complex query; it turns out this is a pretty bad plan as the nested loop's row estimates are quite off (1 estimated / 1207881 actual). If I disable enable_nestloop, the query executes much faster (42 seconds instead o