java
html
iphone
css
c
ajax
mysql
linux
android
visual-studio
multithreading
eclipse
silverlight
json
facebook
delphi
apache
mvc
jsp
dom
I would add the deleteFlag and also a lastUpdate column. Whenever the deleteFlag value changes you can set the lastUpdate column to NOW(). So you will know if the user is deleted/undeleted and when. Adding two such columns should not affect performance.
NOW()
The presence of an additional boolean column shouldn't make much difference as your application scales if you index your deleted timestamp column. The single column should work out just fine, and if you get tired of having to use the condition:
WHERE deleted_date IS NOT NULL
... all the time to determine which users are active, you might consider just creating views for that:
CREATE VIEW active_users AS ( SELECT username, name, email FROM users WHERE deleted_date IS NOT NULL );
I would probably use the additional boolean column just to make querying a little tidier. However, it adds a little complexity in your application code to remember to update both columns. Alternatively, you can create a trigger to set the timestamp when the boolean is updated to 1.
1
I would use datetime as flag field. And if you have a lot of users, use non-blocking table altering: oak-online-alter-table