Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Tables, views, and indexes » Indexes

 

Rebuilding an index

Rebuild an index that is fragmented due to extensive insertion and deletion operations on the table or materialized view.

Prérequis

To rebuild an index on a table, you must be the owner of the table or have one of the following privileges:

  • REFERENCES privilege on the table
  • ALTER ANY INDEX system privilege
  • ALTER ANY OBJECT system privilege

To rebuild an index on a materialized view, you must be the owner of the materialized view or have one of the following privileges:

  • ALTER ANY INDEX system privilege
  • ALTER ANY OBJECT system privilege

Contexte et remarques

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.

 Task
  1. In Sybase Central, use the SQL Anywhere 16 plug-in to connect to the database.

  2. In the left pane, double-click Indexes.

  3. Right-click the index and click Rebuild.

  4. Click OK.

Résultat

The index is rebuilt with fragmentation removed.

 See also