Re: First patch -- somewhat trivial feature

From: Robert Berry <berrydigital(at)gmail(dot)com>
To: David Johnston <polobo(at)yahoo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: First patch -- somewhat trivial feature
Date: 2013-11-14 00:31:07
Message-ID: CAM=RetG0i01RVeJfHL3ko2p-1j8hGtOjtAPgYgGTYgvFRmi3_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Snowman --

Thanks for feedback. I imagined this feature could be useful in a couple
of contexts, though mainly in the sense of documenting query optimization
efforts.

In one case you may be tweaking cost parameters and having a built in
record of the parameters in the explain output can make that more reliable.

In a support context, it can help communicate all the details behind the
selection of a query plan, perhaps on IRC support.

David J. --

I originally conceived the notion for the feature while off in the deep end
thinking about automatic cost parameter selection.

It seems plausible that the ideal theoretical costs would be influenced by
server activity (io/cpu utilization) and various buffer states at a point
in time. This kind of optimization work is a little beyond my
understanding and capability so this was a first step in thinking about
this topic. It turned into a trivial user text output feature, but
implementing output formats that are more machine friendly still makes a
lot of sense.

Best Regards,
-Robert

On Wed, Nov 13, 2013 at 4:16 PM, David Johnston <polobo(at)yahoo(dot)com> wrote:

> Stephen Frost wrote
> > * Robert Berry (
>
> > berrydigital@
>
> > ) wrote:
> >> This is my first attempt at writing a patch, so it's pretty simple.
> >
> > Neat!
> >
> >> seq_page: 1.000000, rnd_page: 4.000000, cpu_tup: 0.010000,
> >> cpu_ind: 0.005000, cpu_op: 0.002500
> >> amenabled: 11111111111
> >>
> >> The bit vector is enable variables in the order listed in cost.h,
> >> though mainly provides a high level view on whether or not any
> strategies
> >> are disabled.
> >
> > While I like the general idea, I have to admit that I don't particularly
> > like the format and I'm not sure why it makes sense to have this as part
> > of 'explain'? Why not do a 'show all;' ahead of the explain?
>
> I kinda get the theory behind this but, WRT formatting, explain can output
> multiple formats and any patch affecting said output should provide for
> changing all of them. Having each of the sample outputs in the post would
> allow for comments from those who would not generally apply such patches.
>
> David J.
>
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/First-patch-somewhat-trivial-feature-tp5778245p5778250.html
> Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2013-11-14 00:32:50 Re: nested hstore patch
Previous Message Tom Lane 2013-11-14 00:28:08 Re: UTF8 national character data type support WIP patch and list of open issues.