Re: [GENERAL] View's plan not taking advantage of WHERE?

2013-06-05 Thread Mike Summers
It appears that the culprit is a cached query plan, the tables in the UNION have changed and no long match however the View does not throw a each UNION query must have the same number of columns error. Is there a way to force the View's query plan to be updated on each access?

Re: [GENERAL] View's plan not taking advantage of WHERE?

2013-06-05 Thread Mike Summers
From what I'm reading the View is frozen when it's created, including it's plan, and the usual solution is to use a set returning function... is this not true? I've double checked all schemas and the view is only defined once. Thanks.

Re: [GENERAL] View's plan not taking advantage of WHERE?

2013-06-05 Thread Mike Summers
Thanks Scott, interesting. Other than the tests in the original post do you have any suggestions? Thanks for your time.

Re: [GENERAL] View's plan not taking advantage of WHERE?

2013-06-05 Thread Mike Summers
see what else we can come-up with. Thanks again. On Wed, Jun 5, 2013 at 9:16 AM, Tom Lane t...@sss.pgh.pa.us wrote: Mike Summers msummer...@gmail.com writes: Other than the tests in the original post do you have any suggestions? If you're speaking of http://www.postgresql.org/message-id

[GENERAL] View's plan not taking advantage of WHERE?

2013-06-04 Thread Mike Summers
I have a VIEW that does not appear to take advantage of the WHERE when given the opportunity: db=# explain select * from best_for_sale_layouts; QUERY PLAN