Skip site navigation (1) Skip section navigation (2)

Re: WIP: cross column correlation ...

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: PostgreSQL - Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
Cc: pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>, Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Subject: Re: WIP: cross column correlation ...
Date: 2011-02-23 01:58:00
Message-ID: AANLkTikYR1KJf-AyyejD3E+SjAYLCi2cEj8SCYRY7QJE@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
2011/2/22 PostgreSQL - Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>:
> how does it work? we try to find suitable statistics for an arbitrary length list of conditions so that the planner can use it directly rather than multiplying all the selectivities. this should make estimates a lot more precise.
> the current approach can be extended to work with expressions and well as "straight" conditions.

/me prepares to go down in flames.

Personally, I think the first thing we ought to do is add a real, bona
fide planner hint to override the selectivity calculation manually,
maybe something like this:

WHERE (x < 5 AND y = 1) SELECTIVITY (0.1);

Then, having provided a method for the DBA to extinguish the raging
flames of searing agony which are consuming them while a crocodile
chews off their leg and their boss asks them why they didn't use
Oracle, we can continue bikeshedding about the best way of fixing this
problem in a more user-transparent fashion.

As to the approach you've proposed here, I'm not sure I understand
what this is actually doing.  Selectivity estimates aren't made
directly for predicates; they're made based on MCV and histogram
information for predicates.

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

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-02-23 02:05:15
Subject: Re: Snapshot synchronization, again...
Previous:From: Alvaro HerreraDate: 2011-02-23 01:55:25
Subject: Re: Snapshot synchronization, again...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group