Added tuples_done and tuples_total

This commit is contained in:
Andrew Kane
2022-01-29 23:15:46 -08:00
parent e375dd33f3
commit fc1de9806a
4 changed files with 31 additions and 28 deletions

View File

@@ -125,7 +125,7 @@ COMMIT;
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;
SELECT phase, tuples_done, tuples_total FROM pg_stat_progress_create_index;
```
The phases are:
@@ -136,6 +136,8 @@ The phases are:
4. `sorting tuples`
5. `loading tuples`
Note: `tuples_done` and `tuples_total` are only populated during the `loading tuples` phase
### Partial Indexes
Consider [partial indexes](https://www.postgresql.org/docs/current/indexes-partial.html) for queries with a `WHERE` clause