From: Samuel Gendler <sgendler@ideasculptor.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-performance@postgresql.org
Subject: Re: poor performance when recreating constraints on large tables
Date: Wed, 8 Jun 2011 12:57:48 -0700
Message-ID: <BANLkTim5GO2k0m7E2=KevdZrMPwH-9aCDg@mail.gmail.com> (raw)
In-Reply-To: <4DEF8CEC020000250003E38D@gw.wicourts.gov>
References: <BANLkTimAhAjMY3qZjxOFENugM+dcy6LmEA@mail.gmail.com>
<12692.1307392671@sss.pgh.pa.us>
<BANLkTinBY9j=v_0Oc5-rVuKcaEuj9f4tYQ@mail.gmail.com>
<BANLkTi=zFRZb5AKXakVxvZqO=QWWCEGKZw@mail.gmail.com>
<BANLkTikpLO0Tz07LGK2G5cVXrG0DA1xCMA@mail.gmail.com>
<4DEF8CEC020000250003E38D@gw.wicourts.gov>
On Wed, Jun 8, 2011 at 12:53 PM, Kevin Grittner <Kevin.Grittner@wicourts.gov
> wrote:
> Samuel Gendler <sgendler@ideasculptor.com> wrote:
>
> > The planner knows how many rows are expected for each step of the
> > query plan, so it would be theoretically possible to compute how
> > far along it is in processing a query based on those estimates,
> > wouldn't it?
>
> And it is sometimes off by orders of magnitude. How much remaining
> time do you report when the number of rows actually processed so far
> is five times the estimated rows that the step would process? How
> about after it chugs on from there to 20 time she estimated row
> count? Of course, on your next query it might finish after
> processing only 5% of the estimated rows....
>
Sure, but if it is a query that is slow enough for a time estimate to be
useful, odds are good that stats that are that far out of whack would
actually be interesting to whoever is looking at the time estimate, so
showing some kind of 'N/A' response once things have gotten out of whack
wouldn't be unwarranted. Not that I'm suggesting that any of this is a
particularly useful exercise. I'm just playing with the original thought
experiment suggestion.
>
> -Kevin
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: sgendler@ideasculptor.com, Kevin.Grittner@wicourts.gov
Subject: Re: poor performance when recreating constraints on large tables
In-Reply-To: <BANLkTim5GO2k0m7E2=KevdZrMPwH-9aCDg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox