Re: machine-readable explain output v4

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Mike <ipso(at)snappymail(dot)ca>, Andres Freund <andres(at)anarazel(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: machine-readable explain output v4
Date: 2009-08-12 16:02:20
Message-ID: 1250092940.26985.118.camel@pcd12478
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2009-08-12 at 17:41 +0200, Andrew Dunstan wrote:
>
> Csaba Nagy wrote:
> > Then why you bother calling it "machine readable" at all ? Would you
> > really read your auto-explain output on the DB server ? I doubt that's
> > the common usage scenario, I would expect that most people would let a
> > tool extract/summarize it and definitely process it somewhere else than
> > on the DB machine, with the proper tool set.

> Sure I would. I look at log files almost every day to find out things.
> Why should I have to wade through a pile of utterly unreadable crap to
> find it?

I look at log files every day too (not almost, but literally every day),
but I really can't imagine myself looking at an explain output directly
in the log file. Even with the output of an 8.2 server which has less
detail than I think the new formats have, I always copy the text from
the psql prompt to some friendlier tool where I can play around with it,
delete parts of it if needed for the sake of clear overview and where I
can easily switch between line-wrap or not and such. I simply don't
believe that a remotely human presentation of the thing worths the
slightest compromise in machine readability. That said, I would like to
finish this discussion here because it gets pointless, I agree to let us
disagree :-)

> Auto-explain lets you have *one* output format. To follow your approach,
> I will have to change that, and have two log files, one machine
> processable and one human readable. Triple bleah.

By ad-hoc I didn't mean reading the auto-explain log, that's surely no
ad-hoc operation... I would make that a mandatory daily routine which is
better handled by a tool which serves you directly the plans of the
worst performing queries sorted by runtime for example and highlighting
the obvious planner mis-estimates. By ad-hoc I mean a query you examine
on the psql command line, and there you can expect human readable of
course without considerations to machine readability.

> I have not suggested anything that would break the machine readability.
> You seem to think that making the machine readable output remotely human
> friendly is somehow going to detract from its machine processability.
> But that's just silly, frankly. I do not want and should not have to
> choose between a format that is machine readable and one that is to some
> extent human readable.

OK, if you can do that it's fine... but I'm afraid that will lead to
compromises on the machine readability side and will only delay the
whole thing.

Cheers,
Csaba.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Suno Ano 2009-08-12 16:04:19 postgres-r
Previous Message Alvaro Herrera 2009-08-12 16:00:31 Re: COPY speedup