From b643ef637a32fc743c8e2ae3f614f0396f6a0c31 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 29 Jan 2022 20:25:06 -0800 Subject: [PATCH] Added indexing progress to readme [skip ci] --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index ffa78ef..3b1526e 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,22 @@ SELECT ... COMMIT; ``` +### Indexing Progress [unreleased] + +Check [indexing progress](https://www.postgresql.org/docs/current/progress-reporting.html#CREATE-INDEX-PROGRESS-REPORTING) with Postgres 12+ + +```sql +SELECT phase FROM pg_stat_progress_create_index; +``` + +The phases are: + +1. `initializing` +2. `sampling table` +3. `performing k-means` +4. `sorting tuples` +5. `loading tuples` + ### Partial Indexes Consider [partial indexes](https://www.postgresql.org/docs/current/indexes-partial.html) for queries with a `WHERE` clause