Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MySql を使用する場合、日付と時刻を格納するデータ型またはエポック タイム スタンプ付きのデータ型を使用する方がよい方法はDATEありDATETIMEますTIMESTAMPかBIGINT?
DATE
DATETIME
TIMESTAMP
BIGINT
それぞれにどのような利点があり、パフォーマンスの違いは何ですか?
date日付のみが必要な場合に使用します。日付と時刻が必要な場合に 使用します。レコードをバージョン管理する必要がある場合に 使用します。その形式で作業していて、1970 年より前の日付が必要ない場合に 使用します。datetimetimestampepoch time
date
datetime
timestamp
epoch time