Re: Getting sorted data from foreign server - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Getting sorted data from foreign server
Date
Msg-id CAFjFpRcn9o3jqUSdxrbPUQ+=YAhYOCnm31n9QSPZM=iRE2a4RA@mail.gmail.com
Whole thread Raw
In response to Re: Getting sorted data from foreign server  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Getting sorted data from foreign server  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers


On Fri, Oct 23, 2015 at 2:43 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Wed, Oct 21, 2015 at 5:23 AM, Ashutosh Bapat
<ashutosh.bapat@enterprisedb.com> wrote:
> Increasing the sorting cost factor (when use_remote_estimates = false) from
> 1.1 to 1.2 makes the difference disappear.
>
> Since the startup costs for postgres_fdw are large portion of total cost,
> extra 10% of rest of the cost is comparable to 1% fuzzy limit. IMO, we
> shouldn't bother too much about it as the path costs are not much different.

My feeling is that cranking the sorting cost factor up to 20-25% would
be a good idea, just so we have less unnecessary plan churn.  I dunno
if sorting always costs that much, but if a 10% cost overhead is
really 1% because it only applies to a fraction of the cost, I don't
think that's good.  The whole point was to pick something large enough
that we wouldn't take the sorted path unless we will benefit from the
sort, and clearly that's not what happened here.


PFA patch with the default multiplication factor for sort bumped up to 1.2.
 
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
Attachment

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::')
Next
From: Dean Rasheed
Date:
Subject: Re: Proposal: Trigonometric functions in degrees