RE : RE : RE : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues

2007-08-07 Thread Mouhamadou Dia
ssage d'origine- De : Tom Lane [mailto:[EMAIL PROTECTED] Envoyé : 6 août 2007 21:31 À : Gregory Stark Cc : Heikki Linnakangas; Mouhamadou Dia; pgsql-bugs@postgresql.org Objet : Re: RE : RE : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues Gregory Sta

RE : RE : RE : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues

2007-08-07 Thread Mouhamadou Dia
[mailto:[EMAIL PROTECTED] De la part de Heikki > Linnakangas > Envoyé : 6 août 2007 15:32 > À : Mouhamadou Dia > Cc : pgsql-bugs@postgresql.org > Objet : Re: RE : [BUGS] BUG #3519: Postgres takes the wrong query plan > resulting in performance issues > > Mouhamadou Dia

Re: RE : RE : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues

2007-08-07 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> The structure of your query is a whole series of left outer joins, the result >> of which is then (inner) joined with one more table. The outer joins return a >> whole lot of records but the inner join is only go

RE : RE : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues

2007-08-07 Thread Mouhamadou Dia
Cc : pgsql-bugs@postgresql.org Objet : Re: RE : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues Mouhamadou Dia wrote: > I'm sending in attachment the output of the explain analyze command and the > create table statements of tables involved in the q

Re: RE : RE : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues

2007-08-06 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > The structure of your query is a whole series of left outer joins, the result > of which is then (inner) joined with one more table. The outer joins return a > whole lot of records but the inner join is only going to match a few of them. Hmmm ... actuall

Re: RE : RE : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues

2007-08-06 Thread Gregory Stark
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes: > Have you played with enable_seqscan=off or enable_hashjoin=off? That's > not a good long term solution, but it would be interesting to see what > happens. I think this is a case where Postgres just doesn't know it can re-order near an outer join

Re: RE : RE : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues

2007-08-06 Thread Heikki Linnakangas
07 15:32 > À : Mouhamadou Dia > Cc : pgsql-bugs@postgresql.org > Objet : Re: RE : [BUGS] BUG #3519: Postgres takes the wrong query plan > resulting in performance issues > > Mouhamadou Dia wrote: >> I'm sending in attachment the output of the explain analyze command and

Re: RE : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues

2007-08-06 Thread Heikki Linnakangas
Mouhamadou Dia wrote: > I'm sending in attachment the output of the explain analyze command and the > create table statements of tables involved in the query. Wait, you said that the query takes 20 seconds on 8.2, but the explain analyze output says that it actually took 50 seconds. Is this the o