Use index with x = ANY(array_column) expression - Mailing list pgsql-general

From Havasvölgyi Ottó
Subject Use index with x = ANY(array_column) expression
Date
Msg-id CAOryeA2DHD_ZiuVtgzmBoBupjHHTPUUCW4_Ut9PbyjGM2ts=2Q@mail.gmail.com
Whole thread Raw
List pgsql-general
Hi all,

Is there a way to speed up ANY-based array element search with some kind of index?
I mean this:

WHERE <parameter> = ANY(<array_column>)

Or is GIN index the only option with the @> operator?

WHERE <array_column> @> ARRAY[<parameter>]

Thank you,
Otto




pgsql-general by date:

Previous
From: Jeremy Finzel
Date:
Subject: Re: ERROR: found multixact from before relminmxid
Next
From: Steve Atkins
Date:
Subject: Re: Performance problem postgresql 9.5