Note that ANY / ALL statements will not work with array indices. If pointers mean:
SELECT COUNT(*) FROM "messages" WHERE 3 && recipient_ids
and negative:
SELECT COUNT(*) FROM "messages" WHERE NOT (3 && recipient_ids)
Then an index can be created, for example:
CREATE INDEX recipient_ids_idx on tableName USING GIN(recipient_ids)
jamming james Jun 20 '14 at 2:56 a.m. 2014-06-20 14:56
source share