`active' flag or not?

后端 未结 18 1943
醉梦人生
醉梦人生 2020-12-25 14:21

OK, so practically every database based application has to deal with \"non-active\" records. Either, soft-deletions or marking something as \"to be ignored\". I\'m curious a

18条回答
  •  忘掉有多难
    2020-12-25 14:56

    Regarding indexing the boolean, why not:

    ALTER TABLE users ADD INDEX index_users_on_active (id, active) ;  
    

    Would that not improve the search?
    However I don't know how much of that answer depends on the platform.

提交回复
热议问题