Large primary key: 1+ billion rows MySQL + InnoDB?

2019-02-05 10:00发布

I was wondering if InnoDB would be the best way to format the table? The table contains one field, primary key, and the table will get 816k rows a day (est.). This will get very large very quick! I'm working on a file storage way (would this be faster)? The table is going to store ID numbers of Twitter Ids that have already been processed?

Also, any estimated memory usage on a SELECT min('id') statement? Any other ideas are greatly appreciated!

7条回答
来,给爷笑一个
2楼-- · 2019-02-05 11:04

If you have an index on your id column, select min(id) should be O(1), there shouldn't be much of a memory requirement for this.

If your primary key is on the twitter id then you have an index on it.

查看更多
登录 后发表回答