-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
专门添加一个IsDeleted(bool类型)字段, DeleteTime字段只用来记录删除时间 #158
Comments
|
确实mysql尽可能使用非null或许使用最小时间做为删除字段判断会比isnull高效譬如>1970/01/01之类的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
您的功能请求与现有问题有关吗?请描述
where DeleteTime is null的效率有点差, 测试了300万条数据, 关联三个表时, 非常耗时.
查阅了相关资料, 资料说尽量不用IsNull做判断.
描述您想要的解决方案
专门添加一个IsDeleted(bool类型)字段, DeleteTime字段只用来记录删除时间
描述你考虑过的替代方案
现在的方式也可以使用
附加上下文,比如截图
无
The text was updated successfully, but these errors were encountered: