Difference between revisions of "REINDEX DATABASE"

From Lianjapedia
Jump to: navigation, search
m (Text replace - "Recital" to "Lianja")
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Rebuilds the indexes for each table in the active database or rebuilds the catalog index tags for a specified database
 
Rebuilds the indexes for each table in the active database or rebuilds the catalog index tags for a specified database
 
  
 
==Syntax==
 
==Syntax==
REINDEX DATABASE [<database name> | ?]
+
REINDEX DATABASE [<database name>]
 
+
  
 
==See Also==
 
==See Also==
[[ADATABASES()]], [[ALTER INDEX]], [[ALTER TABLE]], [[BACKUP DATABASE]], [[CLOSE DATABASES]], [[CLOSE TABLES]], [[COMPILE DATABASE]], [[COPY DATABASE]], [[CREATE DATABASE]], [[CREATE INDEX]], [[CREATE TABLE]], [[CREATE VIEW]], [[DB_DATADIR]], [[DBUSED()]], [[DISPLAY DATABASE]], [[DISPLAY INDEXES]], [[DISPLAY SCHEMAS]], [[DISPLAY TABLES]], [[DROP DATABASE]], [[DROP INDEX]], [[DROP TABLE]], [[GETENV()]], [[INDEX]], [[LIST DATABASE]], [[LIST INDEXES]], [[LIST SCHEMAS]], [[LIST TABLES]], [[OPEN DATABASE]], [[PACK DATABASE]], [[REBUILD DATABASE]], [[RESTORE DATABASE]], [[SET AUTOCATALOG]], [[SET EXCLUSIVE]], [[SQL USE|USE]]
+
[[ADATABASES()]], [[ALTER INDEX]], [[ALTER TABLE]], [[CLOSE DATABASES]], [[CLOSE TABLES]], [[COMPILE DATABASE]], [[COPY DATABASE]], [[CREATE DATABASE]], [[CREATE INDEX]], [[CREATE TABLE]], [[CREATE VIEW]], [[DBUSED()]], [[DISPLAY DATABASE]], [[DISPLAY INDEXES]], [[DISPLAY SCHEMAS]], [[DISPLAY TABLES]], [[DROP DATABASE]], [[DROP INDEX]], [[DROP TABLE]], [[GETENV()]], [[INDEX]], [[LIST DATABASE]], [[LIST INDEXES]], [[LIST SCHEMAS]], [[LIST TABLES]], [[OPEN DATABASE]], [[PACK DATABASE]], [[REBUILD DATABASE]], [[SET AUTOCATALOG]], [[SET EXCLUSIVE]], [[SQL USE|USE]]
 
+
  
 
==Description==
 
==Description==
 
The REINDEX DATABASE command rebuilds the indexes for each table in the active database.
 
The REINDEX DATABASE command rebuilds the indexes for each table in the active database.
  
Databases in Lianja are implemented as directories containing files that correspond to the tables and associated files in the database.  Operating System file protection can be applied individually to the files for added security.  The directories are sub-directories of the Lianja data directory.  The environment variable DB_DATADIR points to the current Lianja data directory and can be queried using the GETENV() function.  Files from other directories can be added to the database using the ADD TABLE command or via the database catalog and SET AUTOCATALOG functionality.  Databases are opened using the OPEN DATABASE command.
+
Databases are opened using the OPEN DATABASE command.
 
+
If the <database name> is specified, the REINDEX DATABASE command will operate on the specified database's catalog file: the catalog's index tags will be rebuilt.  If the question mark, '?', is included instead of the <database name>, the 'SELECT A FILE' dialog will be displayed, allowing the user to select the database.  The dialog defaults to the DB_DATADIR directory.
+
  
 +
If the <database name> is specified, the REINDEX DATABASE command will operate on the specified database's catalog file: the catalog's index tags will be rebuilt.
  
 
==Example==
 
==Example==
Line 27: Line 23:
 
</code>
 
</code>
  
 
==Products==
 
Lianja Server, Lianja
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:SQL]]
 
[[Category:SQL]]
 
[[Category:Databases]]
 
[[Category:Databases]]
[[Category:Databases Commands]]
+
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Command Extensions]]

Revision as of 10:45, 21 December 2012

Purpose

Rebuilds the indexes for each table in the active database or rebuilds the catalog index tags for a specified database

Syntax

REINDEX DATABASE [<database name>]

See Also

ADATABASES(), ALTER INDEX, ALTER TABLE, CLOSE DATABASES, CLOSE TABLES, COMPILE DATABASE, COPY DATABASE, CREATE DATABASE, CREATE INDEX, CREATE TABLE, CREATE VIEW, DBUSED(), DISPLAY DATABASE, DISPLAY INDEXES, DISPLAY SCHEMAS, DISPLAY TABLES, DROP DATABASE, DROP INDEX, DROP TABLE, GETENV(), INDEX, LIST DATABASE, LIST INDEXES, LIST SCHEMAS, LIST TABLES, OPEN DATABASE, PACK DATABASE, REBUILD DATABASE, SET AUTOCATALOG, SET EXCLUSIVE, USE

Description

The REINDEX DATABASE command rebuilds the indexes for each table in the active database.

Databases are opened using the OPEN DATABASE command.

If the <database name> is specified, the REINDEX DATABASE command will operate on the specified database's catalog file: the catalog's index tags will be rebuilt.

Example

open database southwind
reindex database
close databases
reindex database southwind