Use the -u option of the oncheck utility to restrict the checking of an R-tree index to specific levels or pages. You can also use this option to perform a cleanup of the index. Unlike the other default options of the oncheck utility, the -u option always takes at least one parameter, enclosed in double quotes. The available parameters are described later on in this section.
You must use the -u option of the oncheck utility in combination with one of the default options (-pk, -pK, -pl, -pL, -ci, or -cI).
The -u option applies to R-tree indexes only. You cannot use this option to check other types of indexes, such as B-tree.
The following table describes the parameters you can specify with the -u option of the oncheck utility.
By default, the oncheck utility starts checking at level 0 or at the root page.
By default, the oncheck utility stops checking at the last level of the R-tree structure.
By default, the oncheck utility starts checking at the root page.
Cleaning up an index includes freeing unused pages, tightening bounding boxes, and merging almost-unused pages.
If you specify this parameter, the database server takes an exclusive lock on the index fragment currently being cleaned up.
You cannot specify any of the other -u parameters with the rtree_cleanup parameter.
The preceding parameters apply to each fragment. For example, if you specify -u "spage(5)", each fragment is checked starting at page 5, assuming it exists in the fragment.
The following example shows how to use the -pk option in combination with the -u option to check only those pages in levels 2 or higher in all the R-tree indexes that exist on the polygons table in the rtree_db database:
oncheck -pk -u "slevel(2)" rtree_db:polygons
The following example shows how to combine two parameters in the -u option to specify where the oncheck utility should start and stop checking the R-tree index:
oncheck -pk -u "slevel(2),elevel(5)" rtree_db:polygons
The following example shows how to perform a cleanup of all R-tree indexes on the polygons table:
oncheck -pk -u "rtree_cleanup" rtree_db:polygonsHome | [ Top of Page | Previous Page | Next Page | Contents | Index ]