Re: [PERFORM] PostgreSQL planner

2013-05-10 Thread Misa Simic
On Friday, May 10, 2013, Robert Haas wrote: > On Sat, Mar 23, 2013 at 8:12 PM, Misa Simic > > > wrote: > > but problem is - we don't know the thing id - we know calc_id: > > > > EXPLAIN ANALYZE > > SELECT * FROM t2_left_t3_volatile v INNER JOIN t1 USING (thing_id) > > WHERE calc_id = 20 > > With

Re: [PERFORM] PostgreSQL planner

2013-05-10 Thread Robert Haas
On Sat, Mar 23, 2013 at 8:12 PM, Misa Simic wrote: > but problem is - we don't know the thing id - we know calc_id: > > EXPLAIN ANALYZE > SELECT * FROM t2_left_t3_volatile v INNER JOIN t1 USING (thing_id) > WHERE calc_id = 20 With this query you've got to scan all three tables. The calc_id qual

[PERFORM] PostgreSQL planner

2013-03-23 Thread Misa Simic
HI, I have a wierd problem with PostgreSQL planner... Problem showed up in Production on PG9.1 (Ubuntu) But I have succeeded to get the same behavior on my PG 9.2 on Windows... it is about 3 tables & onad one view - but view have volatile function: CREATE TABLE t1 ( calc_id serial NOT NULL,