开发者

Is it safe to store Tweet IDs as BIGINTs?

Moving forwards, am I going to have a problem at some point 开发者_StackOverflow社区if I store Tweet IDs from the Twitter API as an unsigned BIGINT in MySQL?

Am I better off using a CHAR(25) or something? The Tweet IDs are only going to get bigger and bigger over time.


an unsigned bigint can hold a value in the range of 0 to 18446744073709551615 (a really big number)

if there are say approx. 52 billion tweets per year then:

18446744073709551615 / 52000000000 = 354745078 years worth of tweets

so I think you'd be safe :P


They confirm id-s are 64-bit integers at this blog post from 2010: https://blog.twitter.com/2010/announcing-snowflake

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜