Mysql - unix time vs datetime

I am writing a php / mysql application that looks like solutions to track site visitors. It will process 100,000 seconds of inserts per day and can be requested by counting page views / day, etc.

Interestingly, in terms of performance, it is better to keep time as a whole (unix time) or as mysql time. Any idea on performance impact?

It seems that getting data is easier with mysql time, since I can use a mysql function like DAYOFYEAR () without FROM_UNIXTIME ().

Any advice is appreciated.

+3
source share
1 answer

TIMESTAMP (4 ), DATETIME. .

GROUP BY DAYOFYEAR (...), DAYOFYEAR , .

+1

Source: https://habr.com/ru/post/1704066/


All Articles