Re: Review of: explain / allow collecting row counts without timing info

Lists: pgsql-hackers
From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <jeff(dot)janes(at)gmail(dot)com>,<tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <tv(at)fuzzy(dot)cz>,<robertmhaas(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review of: explain / allow collecting row counts without timing info
Date: 2012-02-05 05:44:28
Message-ID: 4F2DC2DD0200002500044DE0@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:

> Yeah, I think we need to preserve that property. Unexpectedly
> executing query (which may have side-effects) is a very dangerous
> thing. People are used to the idea that ANALYZE == execute, and
> adding random other flags that also cause execution is going to
> burn somebody.

+1

FWIW, another reason not to use Robert's suggested syntax is that you
get "rows=n" entries with or without the actual run. You just don't
get the "actual" block to compare to the estimate. So ROWS as an
option would be very ambiguous.

-Kevin


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: jeff(dot)janes(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, tv(at)fuzzy(dot)cz, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Review of: explain / allow collecting row counts without timing info
Date: 2012-02-07 16:29:50
Message-ID: CA+TgmoZdAG6BJPvQ6bynrnQPOR2gB-X2zZCpNYk-4F7nG+_sog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sun, Feb 5, 2012 at 12:44 AM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Tom Lane  wrote:
>
>> Yeah, I think we need to preserve that property. Unexpectedly
>> executing query (which may have side-effects) is a very dangerous
>> thing.  People are used to the idea that ANALYZE == execute, and
>> adding random other flags that also cause execution is going to
>> burn somebody.
>
> +1
>
> FWIW, another reason not to use Robert's suggested syntax is that you
> get "rows=n" entries with or without the actual run.  You just don't
> get the "actual" block to compare to the estimate.  So ROWS as an
> option would be very ambiguous.

OK, so based on that resoundingly unanimous input, I've committed
Tomas's last version. I made some alterations to the sgml
documentation to avoid mentioning "gettimeofday" specifically, because
that might not be the call everywhere (e.g. Windows) and even if it
is, it doesn't seem too user-friendly. The code is entirely as he had
it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company