Re: [PERFORM] left join + case - how is it processed?

2009-01-19 Thread Chris
Tom Lane wrote: Chris writes: I can see it's doing the extra filter step at the start (4th line) which is not present without the coalesce/case statement. I just don't understand why it's being done at that stage. It's not that hard to understand. With the original view formulation (or the

[PERFORM] Query running long - cost estimation question...

2009-01-19 Thread Akos Gabriel
(now that my test went through, here is the question :) ) Dear Community, We are using PostgreSQL proudly for quite a long time, but now we are facing an interesting problem. Query plan seems to depend on how long the IN() clause is. explain analyze select p.product_id from product p left join

[PERFORM] test

2009-01-19 Thread Akos Gabriel
sorry, I just wonder why I can't get my message delivered... -- Üdvözlettel, Gábriel Ákos -=E-Mail :akos.gabr...@i-logic.hu|Web: http://www.i-logic.hu=- -=Tel/fax:+3612391618|Mobil:+36209278894 =- -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)

Re: [PERFORM] left join + case - how is it processed?

2009-01-19 Thread Richard Broersma
On Sun, Jan 18, 2009 at 7:30 PM, Chris wrote: > I have a view that looks like this: > > SELECT >CASE >WHEN r.assetid IS NULL THEN p.assetid >ELSE r.assetid >END AS assetid, >CASE >WHEN r.userid IS NULL THEN p.userid >ELSE r.

Re: [PERFORM] left join + case - how is it processed?

2009-01-19 Thread Tom Lane
Chris writes: > I can see it's doing the extra filter step at the start (4th line) which > is not present without the coalesce/case statement. I just don't > understand why it's being done at that stage. It's not that hard to understand. With the original view formulation (or the COALESCE vers