Addressing Integer Limitations in MySQL
While BIGINT seems to be the largest integer type available in MySQL, it is actually limited to values that can be represented in 64 bits. This means that certain integer values exceeding 20 digits, such as 99,999,999,999,999,999,999, cannot be stored as a BIGINT.
Storage Recommendations in the Twitter API
In some cases, users may encounter recommendations from the Twitter API to store large integers as VARCHAR. This is because integer manipulation in MySQL is typically faster than processing textual representations. However, storing large integers as VARCHAR may not be optimal if mathematical operations are required on the data.
Reasons for Choosing One Type Over Another
The choice between integer and VARCHAR depends on several factors:
Alternative Data Types
In cases where integers exceed the range of 64 bits, alternative data types can be considered:
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3