R-tree index parameters
You use index parameters to specify how the R-tree access method builds an R-tree index on a table column. The index parameters only affect the creation of the index; they do not affect subsequent use of the index.
Each index parameter is set to a value in single quotes. For example,
if you want to specify a fill factor of 80, you specify the index
parameter as FILLFACTOR='80'
. For detailed examples
of using index parameters, refer to Examples of creating R-tree indexes.
The following table describes each R-tree index parameter in detail.
Index parameter | Description | Default value |
---|---|---|
BOTTOM_UP_BUILD | Specifies whether to use bottom-up building when creating an R-tree index By default, the R-tree secondary access method builds an R-tree index by using an algorithm that bulk loads data very quickly into the index. This is also called bottom-up building. To use bottom-up building, you must create a temporary dbspace. You can set this index parameter to NO (do not use bottom-up building to build the R-tree index) or YES. For detailed information on bottom-up building of R-tree indexes, refer to Bottom-up building of R-tree indexes. | Yes |
SORT_MEMORY | Specifies the amount of shared memory in kilobytes (per index fragment) that the R-tree secondary access method uses for sorting when it creates an R-tree index with the bottom-up building method. This index parameter only applies if BOTTOM_UP_BUILD is also specified. Increase the value of SORT_MEMORY to speed up the R-tree index creation. The minimum value you can set this index parameter to is 8. The maximum value is determined by the amount of shared memory available on your computer. You can also specify the shared memory the R-tree access method uses for sorting by setting the ONCONFIG parameters DS_TOTAL_MEMORY and DS_MAX_QUERIES, as described in the Default value column. | The value of the ONCONFIG parameter DS_TOTAL_MEMORY divided by the value of the ONCONFIG parameter DS_MAX_QUERIES If the two ONCONFIG parameters are not specified in the onconfig file, then the default values of the two ONCONFIG parameters are used. The default value for DS_TOTAL_MEMORY is 256 KB and the default value for DS_MAX_QUERIES is 2. |
FILLFACTOR | Specifies what percentage of an index page should be filled with entries as the R-tree access method creates the R-tree index The unfilled part of an index page is then available for future growth of the index. This index parameter only applies if BOTTOM_UP_BUILD is also specified. If you specify a low value, the index will be larger, but there will be more space on each index page to accommodate future entries in the index. Although it is not necessary to leave space for future entries, if the pages are too full, the first few new entries will cause many page splits and thus slow performance. If you specify a high value, the R-tree index will be smaller, but new additions to the index might cause more page splits. This index parameter is similar to that for B-tree indexes. You can set this index parameter to an integer between 1 and 100. | 100 This means that all index pages will be completely filled. |
NO_SORT | Speeds up the creation of R-tree indexes on already-sorted
tables The NO_SORT index parameter is only valid with R-tree indexes that support bottom-up build. The DataBlade® module you are using must provide a function that returns a numeric spatial key given an object of the data type that is being indexed. The procedure shown inUsing the NO_SORT index parameter explains how to first sort a table and then create an R-tree index using the NO_SORT index parameter. |
NO |
BOUNDING_BOX_INDEX | When set to NO, creates an R-tree index that stores
copies of the data objects themselves in the leaf pages (instead of
just their bounding boxes) During an R-tree index scan, if the index
is a bounding-box-only index (the default), the table is accessed
for the final exact geometry check. For this reason, many more additional
page reads can occur during a scan if the row size of the table is
large due to large columns. In this case, to improve performance,
you can create your R-tree index so that copies of the data objects
are stored in the leaf pages. Specify BOUNDING_BOX_INDEX='NO' in the
CREATE INDEX statement, as the following example shows:
|
YES |