简体   繁体   English

Mysql Innodb在具有多数空值的列上建立索引

[英]Mysql Innodb indexing on a column with majority null values

I tried to index a date time field in a table with 20 million rows. 我试图索引具有2000万行的表中的日期时间字段。 Majority(99%) of the rows for that column are null. 该列的大多数(99%)行为空。 After that, CPU utilization shot up to 100% because of this. 此后,CPU利用率因此飙升至100%。 I'm not able to find out the exact reason for the same. 我无法找出相同原因的确切原因。

As an optimization, InnoDB "delays" the updating of indexes. 作为优化,InnoDB“延迟”了索引的更新。 Probably what happened is that this delayed operation is happening, causing the CPU to spike. 可能发生的情况是这种延迟的操作正在发生,从而导致CPU峰值。

For further info, search for "InnoDB change buffering". 有关更多信息,请搜索“ InnoDB更改缓冲”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM