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

From Simon Riggs
Subject Re: The science of optimization in practical terms?
Date
Msg-id 1234995725.3973.161.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: The science of optimization in practical terms?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: The science of optimization in practical terms?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 2009-02-18 at 15:32 -0500, Tom Lane wrote:

> An idea that I think has been mentioned before is to try to identify
> cases where we can *prove* there is at most one row emitted by a
> sub-path (eg, because of a unique index, DISTINCT subplan, etc).  Then
> we could penalize nestloops with outer relations that weren't provably a
> single row.  This is basically restricting the notion of estimation
> confidence to a special case that's particularly important for SQL.

Proof seems best way forward. IIRC the reason we didn't do this before
HOT is that unique index scans did often return many more than one row.
Now we have a much better chance of it being true.

As you say, propagation of error makes an error bars approach pointless
too quickly to be worth pursuing.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Start background writer during archive recovery.
Next
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Start background writer during archive recovery.