pgsql: Provide real selectivity estimators for inet/cidr operators.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Provide real selectivity estimators for inet/cidr operators.
Date: 2015-04-01 21:11:27
Message-ID: E1YdPv5-0007xx-52@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Provide real selectivity estimators for inet/cidr operators.

This patch fills in the formerly-stub networksel() and networkjoinsel()
estimation functions. Those are used for << <<= >> >>= and && operators
on inet/cidr types. The estimation is not perfect, certainly, because
we rely on the existing statistics collected for the inet btree operators.
But it's a long way better than nothing, and it's not clear that asking
ANALYZE to collect separate stats for these operators would be a win.

Emre Hasegeli, with reviews from Dilip Kumar and Heikki Linnakangas,
and some further hacking by me

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/89840d7d3fa943cb932f6a00707fdb17a9cab001

Modified Files
--------------
src/backend/utils/adt/network_selfuncs.c | 980 +++++++++++++++++++++++++++++-
1 file changed, 977 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2015-04-01 22:25:51 pgsql: pg_upgrade: call 'postgres' binary to get data directory locati
Previous Message Heikki Linnakangas 2015-04-01 16:24:03 pgsql: Move inet/cidr GiST opclass functions to correct place in header