KI_GROW
Argument | Enumeration | Purpose |
---|---|---|
handle | Handle of file | |
nNewRows | Number of rows after the operation | |
eMode | KDB_GROW_ENUM | Mode of growth |
status | KDB_ERROR_ENUM | Return status |
KI_GROW
This function will resize a KDB table to a new, larger size adjusting the index appropriately. An exclusive lock may taken during this operation. This replaces the obsolete KI_EXTEND function. Modes supported are:
Mode | Purpose |
---|---|
_KDB_GROW_TABLE | Extend a table to accommodate the new number of rows. This will work on all types of KDB tables but it will be quite disk intensive on a KDB6 table where it may have to shuffle data and should only be done if the table does not have extents defined. An exclusive lock is taken. |
_KDB_GROW_EXTENT | Add an extent to a KDB6 table according to the specification established by KI_SET_EXTENT. Only W mode access is required. This is much faster than mode 1 for a KDB6 table but there is a limit on the maximum number of extents allowed. |
_KDB_GROW_TRUNCATE | This truncates the table to rows rows which must be greater than the data highwater mark. This only works with KDB6 tables that have been consolidated to one index and one data extent. It also performs a full index rebuild and will require an exclusive open. |
For KDB7 tables mode _KDB_GROW_TABLE and mode _KDB_GROW_EXTENT are identical and cause sufficient extra pages to be added to the table to accommodate the extra rows and a guess for the size of the index they would require. This is quite efficient and, though the table will be locked while this happens, it should only take a short time.
SQL considerations
KI_GROW is not applicable to SQL databases and will have no effect.