Re: [PERFORM] bizarre query performance question

2008-10-02 Thread Richard Huxton
H. William Connors II wrote: > fa_assignment has 44184945 records > fa_assignment_detail has 82196027 records > > explain select * from fa_assignment fa JOIN fa_assignment_detail fad ON > (fad.assignment_id = fa.assignment_id) where fa.scenario_id = 0; > >

Re: [PERFORM] bizarre query performance question

2008-10-01 Thread H. William Connors II
Lennin Caro wrote: --- On Wed, 10/1/08, H. William Connors II <[EMAIL PROTECTED]> wrote: From: H. William Connors II <[EMAIL PROTECTED]> Subject: [PERFORM] bizarre query performance question To: pgsql-performance@postgresql.org Date: Wednesday, October 1, 2008, 8:34 PM I hav

Re: [PERFORM] bizarre query performance question

2008-10-01 Thread Lennin Caro
--- On Wed, 10/1/08, H. William Connors II <[EMAIL PROTECTED]> wrote: > From: H. William Connors II <[EMAIL PROTECTED]> > Subject: [PERFORM] bizarre query performance question > To: pgsql-performance@postgresql.org > Date: Wednesday, October 1, 2008, 8:34 PM > I ha

[PERFORM] bizarre query performance question

2008-10-01 Thread H. William Connors II
I have two fairly simple tables as described below. The relationship between them is through assignment_id. The problem is when I try to join these two tables the planner does a sequential scan on fa_assignment_detail and the query takes forever to resolve. I've run the usual vacuum and anal