On Wed, Mar 22, 2017 at 5:38 AM, Thomas Munro
<thomas.mu...@enterprisedb.com> wrote:
> Isn't that one row short?  What happened to this one?
>
>  10.0.0.0/8         | 10::/8

Actually, In my last test I did not connect to regression database, I
have simply taken table and the few rows from inet.sql so it was only
16 rows even with seqscan.

Here are the updated results when I connect to regression database and re-test.

regression=# SELECT * FROM inet_tbl WHERE i <> '192.168.1.0/24'::cidr
ORDER BY i;
         c          |        i
--------------------+------------------
 10.0.0.0/8         | 9.1.2.3/8
 10.0.0.0/8         | 10.1.2.3/8
 10.0.0.0/32        | 10.1.2.3/8
 10.0.0.0/8         | 10.1.2.3/8
 10.1.0.0/16        | 10.1.2.3/16
 10.1.2.0/24        | 10.1.2.3/24
 10.1.2.3/32        | 10.1.2.3
 10.0.0.0/8         | 11.1.2.3/8
 192.168.1.0/24     | 192.168.1.226/24
 192.168.1.0/24     | 192.168.1.255/24
 192.168.1.0/24     | 192.168.1.0/25
 192.168.1.0/24     | 192.168.1.255/25
 192.168.1.0/26     | 192.168.1.226
 10.0.0.0/8         | 10::/8
 ::ffff:1.2.3.4/128 | ::4.3.2.1/24
 10:23::f1/128      | 10:23::f1/64
 10:23::8000/113    | 10:23::ffff
(17 rows)

regression=# explain analyze SELECT * FROM inet_tbl WHERE i <>
'192.168.1.0/24'::cidr
ORDER BY i;
                                                            QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------
 Gather Merge  (cost=16.57..16.67 rows=10 width=64) (actual
time=4.972..4.983 rows=17 loops=1)
   Workers Planned: 1
   Workers Launched: 1
   ->  Sort  (cost=16.56..16.58 rows=10 width=64) (actual
time=0.107..0.110 rows=8 loops=2)
         Sort Key: i
         Sort Method: quicksort  Memory: 26kB
         ->  Parallel Bitmap Heap Scan on inet_tbl  (cost=12.26..16.39
rows=10 width=64) (actual time=0.051..0.053 rows=8 loops=2)
               Recheck Cond: (i <> '192.168.1.0/24'::inet)
               Heap Blocks: exact=1
               ->  Bitmap Index Scan on inet_idx3  (cost=0.00..12.26
rows=17 width=0) (actual time=0.016..0.016 rows=17 loops=1)
                     Index Cond: (i <> '192.168.1.0/24'::inet)
 Planning time: 0.113 ms
 Execution time: 5.691 ms
(13 rows)


-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to