Re: [PERFORM] near identical queries have vastly different plans

2011-06-30 Thread Samuel Gendler
On Thu, Jun 30, 2011 at 1:53 AM, Samuel Gendler wrote: > If I could figure out either a query structure or an index structure which > will force the fast query plan, I'd be much happier. So that is what I am > looking for - an explanation of how I might convince the planner to always > use the fa

Re: [PERFORM] Poor performance when joining against inherited tables

2011-06-30 Thread Robert Haas
On Wed, May 11, 2011 at 4:47 PM, Lucas Madar wrote: > On 05/11/2011 09:38 AM, Robert Haas wrote: >>> >>> However, if I disable seqscan (set enable_seqscan=false), I get the >>> following plan: >>> >>>  QUERY PLAN >>> >>>  Hash Join  (cost=10001298843.53..290002337961.71 rows=8643757 w

Re: [PERFORM] is parallel union all possible over dblink?

2011-06-30 Thread Greg Spiegelberg
On Thu, Jun 30, 2011 at 3:02 AM, Svetlin Manavski < svetlin.manav...@gmail.com> wrote: > I am now a bit puzzled after the initial satisfaction by Marinos' reply. > > 1. what do you mean exactly by "to ensure your UNION succeeds". The dblink > docs do not mention anything about issues using directl

Re: [PERFORM] near identical queries have vastly different plans

2011-06-30 Thread Samuel Gendler
On Thu, Jun 30, 2011 at 1:53 AM, Samuel Gendler wrote: > If I could figure out either a query structure or an index structure which > will force the fast query plan, I'd be much happier. So that is what I am > looking for - an explanation of how I might convince the planner to always > use the fa

[PERFORM] near identical queries have vastly different plans

2011-06-30 Thread Samuel Gendler
Here's the setup: I'm cross joining two dimensions before left outer joining to a fact table so that I can throw a default value into the resultset wherever a value is missing from the fact table. I have a time dimension and another dimension. I want the cross join to only cross a subset of rows