1

My database currently uses datetime for time, and does a number of selects against them.

Would switching to timestamp field types make an impact on query speed?

Ian McIntyre Silber
  • 5,553
  • 13
  • 53
  • 76

2 Answers2

1

The best way to find out is the measure. It really depends on the kind queries you make, however I doubt this will make a noticeable performance difference in your overall program. You should use the one which most accurately describes the data you wish to store, and not worry about the performance difference as it is probably going to be negligible.

Oleksi
  • 12,947
  • 4
  • 56
  • 80
0

Timestamps in MySQL generally used to track changes to records, and are updated every time the record is changed. If you want to store a specific value you should use a datetime field.

Source --

Should I use field 'datetime' or 'timestamp'?

Community
  • 1
  • 1
swapnesh
  • 26,318
  • 22
  • 94
  • 126