Class AbstractCreateIndexMethodOptionsSyntax
Inheritance
Inherited Members
Namespace: FluentMigrator.Builder.Create.Index
Assembly: FluentMigrator.Extensions.Postgres.dll
Syntax
public abstract class AbstractCreateIndexMethodOptionsSyntax : ICreateIndexMethodOptionsSyntax, ICreateIndexOptionsSyntax
Constructors
AbstractCreateIndexMethodOptionsSyntax(ICreateIndexOptionsSyntax)
Declaration
protected AbstractCreateIndexMethodOptionsSyntax(ICreateIndexOptionsSyntax createIndexOptionsSyntax)
Parameters
Type | Name | Description |
---|---|---|
ICreateIndexOptionsSyntax | createIndexOptionsSyntax |
Properties
CreateIndexOptionsSyntax
Declaration
protected ICreateIndexOptionsSyntax CreateIndexOptionsSyntax { get; }
Property Value
Type | Description |
---|---|
ICreateIndexOptionsSyntax |
Methods
Clustered()
Defines the index as clustered
Declaration
public ICreateIndexOnColumnSyntax Clustered()
Returns
Type | Description |
---|---|
ICreateIndexOnColumnSyntax | Defines the column for the index |
Fillfactor(int)
The fillfactor for an index is a percentage that determines how full the index method will try to pack index pages.
Declaration
public ICreateIndexMethodOptionsSyntax Fillfactor(int fillfactor)
Parameters
Type | Name | Description |
---|---|---|
int | fillfactor | The fillfactor value from 10 to 100 can be selected |
Returns
Type | Description |
---|---|
ICreateIndexMethodOptionsSyntax | The next step |
Remarks
For B-trees, leaf pages are filled to this percentage during initial index build, and also when extending the index at the right (adding new largest key values). If pages subsequently become completely full, they will be split, leading to gradual degradation in the index's efficiency. B-trees use a default fillfactor of 90, but any integer value from 10 to 100 can be selected. If the table is static then fillfactor 100 is best to minimize the index's physical size, but for heavily updated tables a smaller fillfactor is better to minimize the need for page splits. The other index methods use fillfactor in different but roughly analogous ways; the default fillfactor varies between methods.
NonClustered()
Defines the index as non-clustered
Declaration
public ICreateIndexOnColumnSyntax NonClustered()
Returns
Type | Description |
---|---|
ICreateIndexOnColumnSyntax | Defines the column for the index |
Unique()
Defines the index as unique
Declaration
public ICreateIndexOnColumnSyntax Unique()
Returns
Type | Description |
---|---|
ICreateIndexOnColumnSyntax | Defines the column for the index |