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.com PostgreSQL Training, Services and Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers