test=# \d x Table "public.x" Column | Type | Modifiers --------+------+----------- y | sig | Indexes: xx gist (y sig_ops) test=# select count(*) from x; count ------- 40000 (1 row) test=# vacuum full analyze x; VACUUM test=# select sig_in('{1,2,3,4,5}'::int4[]); sig_in ------------------------------------------------------------------ .*****.......................................................... (1 row) test=# select * from x where y ~>= sig_in('{1,2,3,4,5}'::int4[]); y ------------------------------------------------------------------ ******.**.*..*****...***....**.****...*.*.*.....*.**.***..*..*.. .*****.....*..............**..**......****.*....*..*.*.*.......* ******.*..***.*..*.**.**......*.**.*....*......*..****.....*...* (3 rows) test=# explain verbose select * from x where y ~>= sig_in('{1,2,3,4,5}'::int4[]); QUERY PLAN -------------------------------------------------------------------------------- { SEQSCAN :startup_cost 0.00 :total_cost 797.00 :rows 40 :width 8 :qptargetlist ( { TARGETENTRY :resdom { RESDOM :resno 1 :restype 1936051 :restypmod -1 :resname y :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { VAR :varno 1 :varattno 1 :vartype 1936051 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1 } } ) :qpqual ( { EXPR :typeOid 16 :opType op :oper { OPER :opno 1936065 :opid 1936063 :opresulttype 16 :opretset false } :args ( { VAR :varno 1 :varattno 1 :vartype 1936051 :vartypmod -1 :varlevelsup 0 :varnoold 1 :varoattno 1 } { EXPR :typeOid 1936051 :opType func :oper { FUNC :funcid 1936054 :funcresulttype 1936051 :funcretset false :funcformat 0 } :args ( { CONST :consttype 1007 :constlen -1 :constbyval false :constisnull false :constvalue 44 [ 44 0 0 0 1 0 0 0 0 0 0 0 23 0 0 0 5 0 0 0 1 0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 ] } ) } ) } ) :lefttree <> :righttree <> :extprm () :locprm () :initplan <> :nprm 0 :scanrelid 1 } Seq Scan on x (cost=0.00..797.00 rows=40 width=8) Filter: (y ~>= sig_in('{1,2,3,4,5}'::integer[])) (94 rows) test=#