Difference between revisions of "ALTER INDEX"
From Recital Documentation Wiki
Helengeorge (Talk | contribs) (→Products) |
Yvonnemilne (Talk | contribs) |
||
Line 8: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[ALTER TABLE]], [[CREATE INDEX]], [[CREATE TABLE]], [[DROP INDEX]], [[ | + | [[ALTER TABLE]], [[CLOSE DATABASES]], [[CREATE INDEX]], [[CREATE TABLE]], [[DROP DATABASE]], [[DROP INDEX]], [[DROP TABLE]], [[OPEN DATABASE]] |
Line 34: | Line 34: | ||
<code lang="recital"> | <code lang="recital"> | ||
// Rebuild the index staff_no index on staff table | // Rebuild the index staff_no index on staff table | ||
− | + | ALTER INDEX staff_no; | |
− | ALTER INDEX staff_no | + | ON staff; |
− | ON staff | + | REBUILD; |
− | REBUILD | + | SHARED |
− | SHARED | + | |
</code> | </code> | ||
Latest revision as of 10:28, 22 December 2009
Purpose
Rebuilds an existing index file for the specified table
Syntax
ALTER INDEX <index> ON <table> REBUILD [SHARED | EXCLUSIVE]
See Also
ALTER TABLE, CLOSE DATABASES, CREATE INDEX, CREATE TABLE, DROP DATABASE, DROP INDEX, DROP TABLE, OPEN DATABASE
Description
The ALTER INDEX command is used to rebuild an existing index file for the specified table. The table must be able to be locked for exclusive use during the operation.
Keywords | Description |
---|---|
index | This is the name of the index being rebuilt. |
table | This is the name of the table for which the index will be rebuilt on. |
REBUILD | Create the index anew using the existing index |
SHARED | Allows read-only transactions on the table while the index is being rebuilt. |
EXCLUSIVE | Prevents any transactions on the table while the index is being rebuilt. |
Example
// Rebuild the index staff_no index on staff table ALTER INDEX staff_no; ON staff; REBUILD; SHARED
Products
Recital Server, Recital