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 : [BUGS] BUG #3519: Postgres takes the wrong query plan resulting in performance issues

2007-08-07 Thread Mouhamadou Dia
why I used the reporting bug Thanks for your help -Message d'origine- De : Heikki Linnakangas [mailto:[EMAIL PROTECTED] De la part de Heikki Linnakangas Envoyé : 6 août 2007 14:32 À : Mouhamadou Dia Cc : pgsql-bugs@postgresql.org Objet : Re: [BUGS] BUG #3519: Postgres takes

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

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

2007-08-06 Thread Heikki Linnakangas
Mouhamadou DIA wrote: > I've migrated to Postgres 8.2.4 and run the same query. It takes now 20 > seconds which is still not acceptable. To help you with that, we'd need to see the EXPLAIN ANALYZE output of the query, and the CREATE TABLE statements of the tables involved in the query and their in

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

2007-08-06 Thread Mouhamadou DIA
The following bug has been logged online: Bug reference: 3519 Logged by: Mouhamadou DIA Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2.4 Operating system: Solaris 10 and Linux Redhat 4 Description:Postgres takes the wrong query plan resulting in performance