Re: Parallel append plan instability/randomness

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jim Finnerty <jfinnert(at)amazon(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel append plan instability/randomness
Date: 2018-01-08 16:36:08
Message-ID: CA+TgmobaRGXb0tNZCTn82PaLcssXzEg++yQGS4OY2Ri9Ypty_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 8, 2018 at 11:28 AM, Jim Finnerty <jfinnert(at)amazon(dot)com> wrote:
> Ordering the plan output elements by estimated cost will cause spurious plan
> changes to be reported after table cardinalities change. Can we choose an
> explain output order that is stable to changes in cardinality, please?

No. The order of the plans in the EXPLAIN output isn't some kind of
display artifact. Parallel Append sorts the paths by cost and by
whether they are partial, for reasons explained in the comments in
create_append_path(), and EXPLAIN prints them in that order.

In general, if you expect to be able to change the contents of the
tables in the regression test database without changing the results of
the regression test queries, you are in for a lot of disappointment.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-01-08 16:42:02 Re: Parallel append plan instability/randomness
Previous Message Jim Finnerty 2018-01-08 16:28:15 Re: Parallel append plan instability/randomness