Search Postgresql Archives

Indices types, what to use. Btree, Hash, Gin or Gist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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 







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux