Performance Tuning: Create index for boolean column

后端 未结 4 773
予麋鹿
予麋鹿 2020-12-28 13:25

I have written a daemon processor which will fetch rows from one database and insert them into another for synchronizing. It will fetch rows based on a boolean

4条回答
  •  独厮守ぢ
    2020-12-28 14:14

    I suggest that you do not index the table (the boolean is a low cardinality field), but partition it instead on the boolean value.

    See: http://www.postgresql.org/docs/9.1/static/ddl-partitioning.html

提交回复
热议问题