Skip to content

Monitoring

You can monitor the progress of building a PostgreSQL index by querying the pg_stat_progress_create_index view.

SQL
SELECT command, phase, round(100.0 * blocks_done / nullif(blocks_total, 0), 1) AS "%" FROM pg_stat_progress_create_index;

Reference

Phases vchordrq

There are 5 steps in the index construction process of vchordrq. The phase name of each step are as follows:

StepMessageDescriptionWaiting time
1initializingStart building indexShort
2initializing index, by internal buildThis step is only for internal build. It involves performing K-means clustering to obtain centroidsLong
2initializing index, by external buildThis step is only for external build. It loads centroids from a specified tableShort
3initializing indexInitialize the data structure and storage of the indexShort
4inserting tuples from table to indexAssign all vectors to their corresponding listsLong
5compacting tuples in indexOptimize the structure of the vector index to enhance performanceMedium

The 4th step, inserting tuples from table to index, takes up the majority of the time during index construction. The tuples_done, blocks_done and blocks_total columns indicate the progress of this step.