Re: Postgres index usage

2024-08-07 Thread Greg Sabino Mullane
On Wed, Aug 7, 2024 at 1:06 PM Dirschel, Steve < steve.dirsc...@thomsonreuters.com> wrote: > I’ve found multiple postings out there saying you can query > pg_stat_all_indexes and look at idx_scan to know if an index has been used > by queries. I want to be 100% sure I can rely on that table/colum

Re: Postgres index usage

2024-08-07 Thread Tom Lane
"Dirschel, Steve" writes: > I queried that table for a specific index and idx_scan is 0. I > queried pg_statio_all_indexes and can see idx_blks_read and > idx_blks_hit have numbers in there. If the index is not being used > then what it causing idx_blks_read and idx_blks_hit to increase over > t

RE: Postgres index usage

2024-08-07 Thread Dirschel, Steve
Didn't mention- this is Aurora Postgres version 14.6 if that matters for my question. Thanks From: Dirschel, Steve Sent: Wednesday, August 7, 2024 12:06 PM To: pgsql-performance@lists.postgresql.org Subject: Postgres index usage I've found multiple postings out there saying you can query pg_s