Database design - boolean attribute or new table

后端 未结 4 1830
太阳男子
太阳男子 2021-01-20 17:53

Let\'s say I have a database table that I want to filter based on a boolean attribute (for example, \"flagged\" attribute). Is it better to just add a \"flagged\" attribute

4条回答
  •  天涯浪人
    2021-01-20 18:33

    Just add column to the table, it is better and simpler.. then create a bitmap index what will speed up your queries if you use this column in WHERE

提交回复
热议问题