July 23, 2014

Using innodb_sys_tables and innodb_sys_indexes

I was playing with Percona Server today and found fast_index_creation does not work quite exactly like described in the manual. The point I’m looking to make though it would be very hard to catch this problem without additional
information_schema tables we added in Percona Server.

I was doing simple ALTER TABLE such as: “alter table sbtest add z int not null;” which I expected would create table with primary key only copy the data to it and when create secondary key by sort. Looking at innodb_sys_tables and innodb_sys_indexes I discovered it is not the case:

Looking around I found post by Alexey Kopytov which states you also need to set expand_fast_index_creation=1 if you want this feature to work… and indeed it does.

This table same ALTER TABLE works taking advantage of this feature.

About Peter Zaitsev

Peter managed the High Performance Group within MySQL until 2006, when he founded Percona. Peter has a Master's Degree in Computer Science and is an expert in database kernels, computer hardware, and application scaling.

Speak Your Mind

*