Re: Broken selectivity with special inet operators - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Broken selectivity with special inet operators
Date
Msg-id 29153.1316638577@sss.pgh.pa.us
Whole thread Raw
In response to Broken selectivity with special inet operators  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Broken selectivity with special inet operators
List pgsql-bugs
Josh Berkus <josh@agliodbs.com> writes:
> Summary: special inet operators ( << >> <<= =>> ) are
>     up to 1000000X off in estimating rowcounts

A look in pg_operator will show you that these operators have no
associated selectivity estimators at all.  It's not so much "broken"
as "unimplemented".

regression=# select oid::regoperator,oprcode,oprrest,oprjoin from pg_operator where (oprleft = 869 or oprright = 869)
andoprresult = 16; 
      oid       |    oprcode    |   oprrest   |     oprjoin
----------------+---------------+-------------+-----------------
 =(inet,inet)   | network_eq    | eqsel       | eqjoinsel
 <>(inet,inet)  | network_ne    | neqsel      | neqjoinsel
 <(inet,inet)   | network_lt    | scalarltsel | scalarltjoinsel
 <=(inet,inet)  | network_le    | scalarltsel | scalarltjoinsel
 >(inet,inet)   | network_gt    | scalargtsel | scalargtjoinsel
 >=(inet,inet)  | network_ge    | scalargtsel | scalargtjoinsel
 <<(inet,inet)  | network_sub   | -           | -
 <<=(inet,inet) | network_subeq | -           | -
 >>(inet,inet)  | network_sup   | -           | -
 >>=(inet,inet) | network_supeq | -           | -
(10 rows)


            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Timezone issues with Postrres
Next
From: Josh Berkus
Date:
Subject: Re: Broken selectivity with special inet operators