Re: Unused indexes

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: arun chirappurath <arunsnmimt(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Unused indexes
Date: 2024-02-05 16:03:59
Message-ID: CANzqJaCnoZH3O-dNxKq1wZEPTpSOS2H3+LC9KdqbZnizNnwrXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 5, 2024 at 9:02 AM arun chirappurath <arunsnmimt(at)gmail(dot)com>
wrote:

> Hi All,
>
> Do we have a script to get unused indexes for 30 days and once identified
> do we have an option to disable and enable when required?
>

The pg_stat_*_tables tables idx_* columns has accumulated usage since the
last time you started the postmaster.

> I sql server we have this option to disable it and need to rebuild it to
> ensemble it
>

Sadly, PG does not have ALTER INDEX ... DISABLE;.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Devrim Gündüz 2024-02-05 16:18:57 Re: Yum Update nothing provides libarmadillo.so.12()(64bit) needed by gdal36-libs-3.6.4-6PGDG.rhel9.x86_64 from pgdg-common
Previous Message David G. Johnston 2024-02-05 15:58:09 Re: Why doesn't Postgres apply limit on groups when retrieving N results per group using WHERE IN + ORDER BY