Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an index type for BIGINT[]?

Tags:

postgresql

I noticed intarray allows an index type for very large INT arrays (gist__intbig_ops), but is there an option for BIGINT[] arrays (gist__bigint_ops)? It will be a small number of BIGINT[] values per record.

like image 982
Nick Avatar asked Sep 11 '25 02:09

Nick


1 Answers

Try a GIN index. No extension is needed.

CREATE INDEX index_name ON tablename USING gin(bigint_array_column);
like image 78
Daniel Vérité Avatar answered Sep 13 '25 15:09

Daniel Vérité