Skip to main content

Index Management

Indexes are a key technique for improving database query performance. By creating indexes on frequently queried fields, you can significantly improve query speed and user experience.

How to Create Indexes

  1. Go to the CloudBase Console / PostgreSQL Database
  2. Navigate to Index Management: select the target table and click the Index Management tab
  3. Manage indexes: create, delete, or modify index configurations

PostgreSQL Index Types

PostgreSQL provides a variety of index types suitable for different query scenarios:

Index TypeDescriptionUse Cases
B-treeDefault index type, supports equality and range queriesMost common query scenarios: =, <, >, BETWEEN, ORDER BY, etc.
HashHash index, supports equality queries onlyExact match scenarios only
GINGeneralized Inverted IndexJSONB field queries, array containment queries, full-text search
GiSTGeneralized Search TreeGeometric data, full-text search, range types, nearest-neighbor queries
BRINBlock Range IndexLarge sequential data tables (e.g., time-series data), very small storage footprint
tip

For detailed explanations and creation syntax for each index type, refer to the PostgreSQL Official Documentation - Indexes.