Tunable buffer size for fast index creation in InnoDB

Registered by Alexey Kopytov

We should look into making the buffer size used for InnoDB fast index creation tunable. It is currently calculated based on the merge block size (which is hardcoded to 1 MB) and the minimum index record size (see row0merge.c for details). In other words, it is allocated to process 1 MB worth of index records.

See also http://www.mysqlperformanceblog.com/2012/06/19/building-indexes-by-sorting-in-innodb-aka-fast-index-creation/

Blueprint information

Status:
Complete
Approver:
Alexey Kopytov
Priority:
Medium
Drafter:
Alexey Kopytov
Direction:
Approved
Assignee:
Alexey Kopytov
Definition:
Approved
Series goal:
Accepted for 5.5
Implementation:
Implemented
Milestone target:
milestone icon 5.5.27-28.0
Started by
Alexey Kopytov
Completed by
Stewart Smith

Whiteboard

Port the innodb_merge_sort_block_size option from the Facebook branch with minor edits. Commit comment from the Facebook branch:

  This diff makes the block size that is used in the merge sort dynamic
  by adding the session variable innodb_merge_sort_block_size. The min
  value for this variable is 1M, and the max is 1G. By varying the
  values of this variable dbas can let the mysql server use larger
  blocks during secondary index creation. The default is 1048576 which
  is 1MB.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.