您的位置:首页 > 大数据 > 物联网

mysql iot 主键自增列问题

2016-07-01 12:32 459 查看
mysql 如何避免热点块?

主键按sn自增列

Oracle 可以通过翻转索引 比如 插入101 102 103 104 变成101 201 301 401 分散数据

反转索引坏处,无法index range scan

mysql> Create Index TEST_INDEX_R On machine_info(sn) Reverse;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Reverse' at line 1
mysql> Create Index TEST_INDEX_R On machine_info(info) Reverse;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Reverse' at line 1
mysql>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: