Rebuilds indexes in a database.
reindexdb [<connection-option> ...] [--table | -t <table> ]
[--index | -i <index> ] [<dbname>]
reindexdb [<connection-option> ...] [--all | -a]
reindexdb [<connection-option> ...] [--system | -s] [<dbname>]
reindexdb --help
reindexdb --version
reindexdb
is a utility for rebuilding indexes in Greenplum Database, and is a wrapper around the SQL command REINDEX
.
-all
is not used, the database name is read from the environment variable
PGDATABASE
. If that is not set, the user name specified for the connection is used.
reindexdb
generates and sends to the server.
Connection Options
PGHOST
or defaults to localhost.
PGPORT
or defaults to 5432.
PGUSER
or defaults to the current system user name.
.pgpass
file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.
reindexdb
might need to connect several times to the master server, asking for a password each time. It is convenient to have a ~/.pgpass
file in such cases.
To reindex the database mydb
:
reindexdb mydb
To reindex the table foo
and the index bar
in a database named abcd
:
reindexdb --table foo --index bar abcd
REINDEX in the Greenplum Database Reference Guide