简体   繁体   中英

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. Majority(99%) of the rows for that column are null. After that, CPU utilization shot up to 100% because of this. I'm not able to find out the exact reason for the same.

As an optimization, InnoDB "delays" the updating of indexes. Probably what happened is that this delayed operation is happening, causing the CPU to spike.

For further info, search for "InnoDB change buffering".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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