Current location - Quotes Website - Signature design - Is it better for mysql to change the time into a timestamp and store it in the int field or directly use datetime?
Is it better for mysql to change the time into a timestamp and store it in the int field or directly use datetime?
It's good to use int directly. After all, time stamps can be converted into time formats by time functions such as FROM_UNIXTIME, and the calculation and summation of int are simpler than datetime, and it should be faster than datetime if the data is generous.

Daniel, the company database, knows that all the data tables of the road are related to time, and the calculation of int is simpler than datetime. If the amount of data is large, the storage speed of int is faster than that of datetime.

A timestamp is a complete and verifiable data block, which represents a piece of data that existed before a specific time, usually a character sequence, and identifies the time at a certain moment.

Using digital signature technology to generate the next generation data, the signature object includes the original file information, signature parameters, signature time and other information. Widely used in intellectual property protection, contract signing, financial accounting, electronic bidding, stock trading and other fields.

Extended data:

There are two types of timestamps:

1. Self-built timestamp: this timestamp is obtained from the time receiving device to the timestamp server, and a timestamp certificate is issued by the timestamp server. Time stamp can be used to determine the internal responsibility of the enterprise, which has no legal effect after being proved by the court. It cannot be used as a legal basis, because it is likely to be tampered with when it is received by the receiving device.

2. Time stamp with legal effect: It is a domestic third-party trusted time stamp authentication service jointly established by the National Time Service Center of Chinese Academy of Sciences and Beijing United Trusted Technology Service Co., Ltd., and the National Time Service Center is responsible for timing and on-time monitoring.