Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-22 Thread Tom Lane
Robert Haas writes: > On Mon, Nov 21, 2011 at 8:54 PM, Tom Lane wrote: >> We could eliminate some annoying tree-copy steps if we could institute >> the policy that parse analysis doesn't scribble on the raw parse tree, >> rewriter doesn't modify parse analysis output, and planner doesn't >> modif

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-22 Thread Robert Haas
On Mon, Nov 21, 2011 at 8:54 PM, Tom Lane wrote: > Robert Haas writes: >> ... Maybe we could find a way to reduce the size of the parse >> tree (i.e. fewer nodes), or the number of times that it has to be >> walked/copied. > > We could eliminate some annoying tree-copy steps if we could institute

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-21 Thread Tom Lane
Robert Haas writes: > ... Maybe we could find a way to reduce the size of the parse > tree (i.e. fewer nodes), or the number of times that it has to be > walked/copied. We could eliminate some annoying tree-copy steps if we could institute the policy that parse analysis doesn't scribble on the ra

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-21 Thread Robert Haas
On Sat, Nov 19, 2011 at 11:47 AM, Andres Freund wrote: > I absolutely cannot agree on the fact that the speed parse-analyze is > irrelevant though. Tom may be right that the speed of the parser *in isolation* is irrelevant, in the narrow sense that if we made the parser twice as slow but somehow

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-19 Thread Tom Lane
Andres Freund writes: > On Saturday, November 19, 2011 04:52:10 PM Tom Lane wrote: >> If you don't like CREATE RULE, try having your test program send just >> Parse messages, and not Bind/Execute. > That sounds like a plan. Except that I would prefer to use pgbench. Well, how about plan C: writ

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-19 Thread Andres Freund
On Saturday, November 19, 2011 04:52:10 PM Tom Lane wrote: > Andres Freund writes: > > Explain is just a vehicle here, I admit that. But on what else should I > > bolt it? > > If you don't like CREATE RULE, try having your test program send just > Parse messages, and not Bind/Execute. That sound

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-19 Thread Tom Lane
Andres Freund writes: > Explain is just a vehicle here, I admit that. But on what else should I bolt > it? If you don't like CREATE RULE, try having your test program send just Parse messages, and not Bind/Execute. I still dislike the idea of exposing a fundamentally-broken-and-useless variant

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-18 Thread Andres Freund
On Saturday, November 19, 2011 12:16:18 AM Tom Lane wrote: > Andres Freund writes: > > Hi, > > For benchmarking the parser I added the above options (dim suggested this > > on irc) which proved to be rather useful for me. > > What exactly is EXPLAIN printing, if you've not done planning? Nothing

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-18 Thread Tom Lane
Andres Freund writes: > Hi, > For benchmarking the parser I added the above options (dim suggested this on > irc) which proved to be rather useful for me. What exactly is EXPLAIN printing, if you've not done planning? Also, I believe the planner depends on the assumption that the rewriter has d

[HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-18 Thread Andres Freund
Hi, For benchmarking the parser I added the above options (dim suggested this on irc) which proved to be rather useful for me. I added the additional rewrite option because the overhead of copying the tree around makes the profile significantly less expressive. I would also like an option which