2 CREATE TABLE cidrtmp AS
3 SELECT cidr(a) AS a FROM inettmp ;
5 SELECT count(*) FROM cidrtmp WHERE a < '121.111.63.82';
11 SELECT count(*) FROM cidrtmp WHERE a <= '121.111.63.82';
17 SELECT count(*) FROM cidrtmp WHERE a = '121.111.63.82';
23 SELECT count(*) FROM cidrtmp WHERE a >= '121.111.63.82';
29 SELECT count(*) FROM cidrtmp WHERE a > '121.111.63.82';
35 CREATE INDEX cidridx ON cidrtmp USING gist ( a );
36 SET enable_seqscan=off;
37 SELECT count(*) FROM cidrtmp WHERE a < '121.111.63.82'::cidr;
43 SELECT count(*) FROM cidrtmp WHERE a <= '121.111.63.82'::cidr;
49 SELECT count(*) FROM cidrtmp WHERE a = '121.111.63.82'::cidr;
55 SELECT count(*) FROM cidrtmp WHERE a >= '121.111.63.82'::cidr;
61 SELECT count(*) FROM cidrtmp WHERE a > '121.111.63.82'::cidr;