SQL - REBUILD INDEXES
Rebuilds automatic indexes.
Syntax
REBUILD INDEX <index>
<index>
Defines the index that you want to rebuild. Use*
to rebuild all automatic indexes.
NOTE: During the rebuild, any idempotent queries made against the index, skip the index and perform sequential scans. This means that queries run slower during this operation. Non-idempotent commands, such as
INSERT
,UPDATE
, andDELETE
are blocked waiting until the indexes are rebuilt.
Examples
Rebuild an index on the
nick
property on the classProfile
:- orientdb>
REBUILD INDEX Profile.nick
- orientdb>
Rebuild all indexes:
- orientdb>
REBUILD INDEX *
- orientdb>
For more information, see