快速辅助索引创建(innodb plugin)

记录备忘

1.创建:

alter table add index.....

innodb先扫描表,根据辅助索引的key列进行排序,然后组织成B树,由于在填充时分裂,具有很高的fill-factor 


2.删除:

 Only the internal InnoDB system tables and the MySQL data dictionary tables need to be updated to reflect the fact that the index no longer exists. InnoDB returns the storage used for the index to the tablespace that contained it, so that new indexes or additional table rows may use the space.


3.alter 创建/删除辅助索引的过程中,在表上加S锁,因此是可读的;对于修改聚集索引,则会加X锁


4. 新创建的辅助索引只包含开始创建时候的记录,只包含当前版本,因此那些在修改索引之前开始的事务,可能无法使用该辅助索引来查询旧的数据



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值