MySQL Integer vs DateTime index

后端 未结 3 390
小鲜肉
小鲜肉 2020-11-30 04:21

Let me start by saying I have looked at many similar questions asked, but all of them relate to Timestamp and DateTime field type without indexing.

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 05:08

    it depends on your application, as you can see in an awesome comparison and benchmark of DATETIME , TIMESTAMP and INT type in Mysql server in MySQL Date Format: What Datatype Should You Use? We Compare Datetime, Timestamp and INT. you can see in some situation INT has better perfomance than other and in some cases DATETIME has better performance. and It completely depends on your application

提交回复
热议问题