Skip to content

Commit 6da165b

Browse files
committed
update docs
1 parent ab619db commit 6da165b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/src/pgstac.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,24 @@ These are procedures that should be run periodically to make sure that statistic
187187
SELECT cron.schedule('0 * * * *', 'CALL validate_constraints();');
188188
SELECT cron.schedule('10, * * * *', 'CALL analyze_items();');
189189
```
190+
191+
### System Checks
192+
193+
#### System and pgSTAC Settings
194+
PgSTAC includes a function for checking common Postgres settings. You must pass in the amount of total memory available to get appropriate memory settings. Do note that these suggestions are merely a good first pass and figuring out the ideal parameters requires further analysis of a system and logs.
195+
```sql
196+
SELECT * FROM check_pgstac_settings('32GB');
197+
```
198+
199+
#### Unused Indexes
200+
Having too many indexes that do not get used can drastically hurt the performance of the database. The following query can be used to show indexes that are not getting used and should be considered for removal.
201+
```sql
202+
SELECT
203+
relname, indexrelname, idx_scan, last_idx_scan,idx_tup_read, idx_tup_fetch,
204+
pg_relation_size(relid) as index_bytes,
205+
pg_size_pretty(pg_relation_size(relid)) as index_size
206+
FROM pg_stat_user_indexes
207+
WHERE schemaname = 'pgstac'
208+
ORDER BY idx_scan ASC
209+
;
210+
```

0 commit comments

Comments
 (0)