Sometimes it is necessary to rebuild an index because it has become fragmented or skewed due to extensive insertion and deletion operations on the table. When you rebuild an index, you rebuild the physical index. All logical indexes that use the physical index benefit from the rebuild operation. You do not need to perform a rebuild on logical indexes. See Index sharing using logical indexes.
You can rebuild indexes in Sybase Central, or by executing an ALTER INDEX ... REBUILD statement. You can also rebuild indexes as part of an effort to remove table fragmentation using the REORGANIZE TABLE statement. This section describes how to rebuild indexes using Sybase Central and the ALTER INDEX ... REBUILD statement. For more information about using the REORGANIZE TABLE statement, see REORGANIZE TABLE statement.
Use the SQL Anywhere 12 plug-in to connect to the database as a user with DBA authority or as the owner of the table on which the index is created.
In the left pane, double-click Indexes.
Right-click the index and choose Rebuild.
Connect to the database as a user with DBA authority, or as the owner of the table associated with the index.
Execute an ALTER INDEX ... REBUILD statement.
Discuss this page in DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|