Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you index arrays? What index type is that? Any tips?

I’ve used array column in PG before, haven’t indexed arrays though.



AFAIK, postgres first got its reputation of high performance because of array indexes.

People usually go with GIN indexes, that can be used on the contains, overlaps or equals comparisons.


Yes, it’s explained in the intarray doc here. GiST is the one I use, but as it states GIN should be faster on reads. I haven’t really thought about that in many years, I should run some perf tests.

https://www.postgresql.org/docs/9.1/intarray.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: