Quick Start
Connect to MySQL
HTTP Tunnel
SSH Tunnel
Databases
Schema
Tables
Adding Fields and Choosing Data Types
Customising Fields
Primary Keys and Indexes
Filter Wizard
Foreign Keys
Foreign Keys Data Selection
Uniques and Checks
Rules and Triggers
Privileges
Import/Export
Function
View
Tablespace
Cast
Language
Aggregate
Conversion
Domain
Trigger Function
Operator
Operator Class
Sequence
Type
Queries
Visual Query Builder
Data
Manage Users
Backup
Data Transfer
Schedule
Server Monitor
Data Synchronization
Structure Synchronization
Console
Virtual Grouping
Maintaining your databases/tables
Preferences
General
Tabs
Tables
Queries
  Maintaining Your Databases/Tables
 

How to do it

Right-click the table in the Database Window and select Maintain tables , then select either Analyze Table(s), Vacuum Table(s) or Reindex Table(s) to start the operation. Navicat will show all the resulting output of the operation.

NOTE: Navicat maintains the tables by issuing standard ANALYZE TABLE, VACUUM TABLE, and REINDEX TABLE statements to the PostgreSQL server. Please see the PostgreSQL documentation for more detail.

Analyze tables

ANALYZE collects statistics about the contents of tables in the database, and stores the results in the system table pg_statistic. Subsequently, the query planner uses these statistics to help determine the most efficient execution plans for queries.

  • Analyzing Database

  • Right-click a database from tree view and select Maintain Database > Analyze Database.

  • Analyzing Table

  • Right-click a table from tree view and select Maintain Tables > Analyze Tables.

With no parameter, ANALYZE examines every table in the current database. With a parameter, ANALYZE examines only that table. It is further possible to give a list of column names, in which case only the statistics for those columns are collected.

Parameters Details
VERBOSE Enables display of progress messages.
table The name (possibly schema-qualified) of a specific table to analyze. Defaults to all tables in the current database.
column The name of a specific column to analyze. Defaults to all columns.

Outputs Details
VERBOSE When VERBOSE is specified, ANALYZE emits progress messages to indicate which table is currently being processed. Various statistics about the tables are printed as well.

Vacuum tables

  • Vacuuming Database

  • Right-click a database from tree view and select Maintain Database > Vacuum Database > Select Option.

  • Vacuuming Table

  • Right-click a table from tree view and select Maintain Tables > Vacuum Tables > Select Option.

With no parameter, VACUUM processes every table in the current database. With a parameter, VACUUM processes only that table.

Parameters Details
FULL Selects "full" vacuum, which may reclaim more space, but takes much longer and exclusively locks the table.
FREEZE Selects aggressive "freezing" of tuples.
VERBOSE Prints a detailed vacuum activity report for each table.
ANALYZE Updates statistics used by the planner to determine the most efficient way to execute a query.
table The name (possibly schema-qualified) of a specific table to analyze. Defaults to all tables in the current database.
column The name of a specific column to analyze. Defaults to all columns.

Outputs Details
VERBOSE When VERBOSE is specified, VACUUM emits progress messages to indicate which table is currently being processed. Various statistics about the tables are printed as well.

Reindex tables

REINDEX allows you to rebuild corrupted indexes. In order words, REINDEX rebuilds an index based on the data stored in the index's table, replacing the old copy of the index.. In some situations, it is worthwhile to rebuild indexes periodically.

  • Reindexing Database

  • Right-click a database from tree view and select Maintain Database > Reindex Database.

  • Reindexing Table

  • Right-click a table from tree view and select Maintain Tables > Reindex Tables.
Parameters Details
DATABASE Recreate all system indexes of a specified database. Indexes on user tables are not processed. Also, indexes on shared system catalogs are skipped except in stand-alone mode (see below).
TABLE Recreate all indexes of a specified table. If the table has a secondary "TOAST" table, that is reindexed as well.
INDEX Recreate a specified index. .
name The name of the specific database, table, or index to be reindexed. Table and index names may be schema-qualified. Presently, REINDEX DATABASE can only reindex the current database, so its parameter must match the current database's name.
FORCE This is an obsolete option; it is ignored if specified.