Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySql Index Fill Factor?

How do you specify the Fill Factor when creating an index in MySql?

like image 240
GateKiller Avatar asked Dec 01 '08 15:12

GateKiller


People also ask

What is fill factor in index?

The fill-factor option is provided for fine-tuning index data storage and performance. When an index is created or rebuilt, the fill-factor value determines the percentage of space on each leaf-level page to be filled with data, reserving the remainder on each page as free space for future growth.

What is fill factor of pages in MySQL?

Fill factor is the value that determines the percentage of space on each leaf-level page to be filled with data. In an SQL Server, the smallest unit is a page, which is made of Page with size 8K. Every page can store one or more rows based on the size of the row.

What is the best value for the fill factor index fill factor and performance Part 2?

If your system static and just read only, a default Fill Factor of 100 (or 0) is ideal. As there is no insert, update or delete, having all the pages filled up makes sense.

What is the default value of Fillfactor?

The default SQL Server Index Fill factor value is 0(100%). With the 100% usage of the page could bring the recital issues while performing large sized table or data updates on the table as there will be no space left for data modification/s.


2 Answers

You don't.

http://dev.mysql.com/doc/refman/5.0/en/create-index.html

However, it is an 'accepted' feature request for version 6.x: http://bugs.mysql.com/bug.php?id=18178

So, don't hold your breath on seeing it any time soon.

like image 87
Matt Rogish Avatar answered Nov 04 '22 07:11

Matt Rogish


Assuming that you are using InnoDB, it seems like this is only supported at database level, not index level.

The setting is called innodb_fill_factor and defaults to 100 see https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_fill_factor for more details.

like image 23
Nameless One Avatar answered Nov 04 '22 06:11

Nameless One