Re: The science of optimization in practical terms? - Mailing list pgsql-hackers

From Ron Mayer
Subject Re: The science of optimization in practical terms?
Date
Msg-id 499C6598.9020604@cheapcomplexdevices.com
Whole thread Raw
In response to Re: The science of optimization in practical terms?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: The science of optimization in practical terms?
List pgsql-hackers
Robert Haas wrote:
> experience, most bad plans are caused by bad selectivity estimates,
> and the #1 source of bad selectivity estimates is selectivity
> estimates for unknown expressions.

ISTM unknown expressions should be modeled as a range of
values rather than one single arbitrary value.

For example, rather than just guessing 1000 rows, if an
unknown expression picked a wide range (say, 100 - 10000
rows; or maybe even 1 - table_size), the planner could
choose a plan which wouldn't be pathologically slow
regardless of if the guess was too low or too high.

For that matter, it seems if all estimates used a range
rather than a single value, ISTM less in general we would
product less fragile plans.


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [COMMITTERS] pgsql: Remove the special cases to prevent minus-zero results in float4
Next
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Remove the special cases to prevent minus-zero results in float4