Re: machine-readable explain output v4 - Mailing list pgsql-hackers

From Csaba Nagy
Subject Re: machine-readable explain output v4
Date
Msg-id 1250092940.26985.118.camel@pcd12478
Whole thread Raw
In response to Re: machine-readable explain output v4  (Andrew Dunstan <andrew@dunslane.net>)
List 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.




pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: COPY speedup
Next
From: Cédric Villemain
Date:
Subject: Re: expanding our usage of POSIX_FADVISE