查找表的最佳 mysql 表类型(重读,无写)
我有一个 ip 到国家/地区的查找表。该表最多每月更新一次,同时阅读也非常频繁。我目前将其作为innodb。对于几乎只能读取的表来说,这是最好的表类型吗?
提前致谢。
i have an ip-to-country lookup table. this table is updated max once a month while read to very frequently. i currently have it as innodb. is this the best table type for a table that is pretty much only read from ?
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会选择 MyISAM。它没有 InnoDB 的很多功能,如果你不需要事务和外键之类的东西,它会更快一些。此外,MyISAM 具有表级锁定,而 InnoDB 使用行级锁定,这对于高读低写表不会有太大区别。
维基百科对这两种表类型进行了很好的比较。
I'd go with MyISAM. It doesn't have a lot of the features of InnoDB which makes it a little quicker if you don't need things like transaction and foreign keys. Also, MyISAM has table-level locking while InnoDB uses row-level locking, which won't make much different for a high-read low-write table.
Wikipedia has a good comparison of the two table types.