From: | Gavin Sherry <swm(at)alcove(dot)com(dot)au> |
---|---|
To: | Gregory Stark <stark(at)enterprisedb(dot)com> |
Cc: | "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Status of Hierarchical Queries |
Date: | 2007-02-22 01:08:34 |
Message-ID: | Pine.LNX.4.58.0702220958100.2452@linuxworld.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 21 Feb 2007, Gregory Stark wrote:
> "Gavin Sherry" <swm(at)alcove(dot)com(dot)au> writes:
>
> > The WITH support seems okay. I guess I'd thought it might be represented
> > different internally (not a sub query) but the approach Greg has taken is
> > probably more straight forward (in that you get a lot of proven code for
> > free). It should work fine for recursive queries too, if you just re-seed
> > the param keys for every scan of the 'sub-query'.
>
> I don't think it works for recursive queries. Since you can't have the same
> executor plan in motion for two different sets of parameters simultaneously.
> That's why I was talking about a Memoize node.
Can you elaborate on the 'two different sets of parameters' bit? I'm still
without coffee.
> It is sufficient for the non-recursive case which might make it worthwhile
> putting it in 8.3. But even there user's expectations are probably that the
> reason they're writing it as a cte is precisely to avoid duplicate execution.
I wonder if the planner should decide that?
Thanks,
Gavin
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2007-02-22 01:29:27 | Re: Status of Hierarchical Queries |
Previous Message | FAST PostgreSQL | 2007-02-22 00:50:06 | Re: WIP patch - INSERT-able log statements |