I have several fields that use to match with my queries. I am curious to what index types is best for what. Here is some examples that will help you understand.
Say I have a 1000 000 rows.
Speed is of the essence here, insertions and updates happens relatively less frequent than search.
I want to match against a boolean field, that is, only true or false is possible. I am thinking Btree but not sure.. correct?
Match against a field which is an big in and contains the ids for the states of america (say 50 different values), a btree again?
Against an integer field? Using > < = and between
Date (no timezone), I would like to have this field presorted in desc order. How does that creation look like?
I understand the Hash is not recommended. When should I use the Gin index ?
Thanks in advance / Moe