Re: Inserts or Updates

From: Vik Reykja <vikreykja(at)gmail(dot)com>
To: Ofer Israeli <oferi(at)checkpoint(dot)com>
Cc: Andy Colson <andy(at)squeakycode(dot)net>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>, Olga Vingurt <olgavi(at)checkpoint(dot)com>, Netta Kabala <nettak(at)checkpoint(dot)com>
Subject: Re: Inserts or Updates
Date: 2012-02-09 10:09:25
Message-ID: CALDgxVtboBUYPCQDPa1GROeJ6a1nyQTAO+SQtze6ycTGvMW3Ag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Feb 8, 2012 at 20:22, Ofer Israeli <oferi(at)checkpoint(dot)com> wrote:

> Andy Colson wrote:
> > Oh, I knew I'd seen index usage stats someplace.
> >
> > give this a run:
> >
> > select * from pg_stat_user_indexes where relname = 'SuperBigTable';
> >
> > http://www.postgresql.org/docs/current/static/monitoring-stats.html
> >
> > -Andy
> >
> > Scanned by Check Point Total Security Gateway.
>
>
> Thanks. We have begun analyzing the indexes and indeed found many are
> pretty useless and will be removed.
>

A quick word of warning: not all indexes are used for querying, some are
used for maintaining constraints and foreign keys. These show up as
"useless" in the above query.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Frank Lanitz 2012-02-09 13:28:35 Re: Inserts or Updates
Previous Message Marcos Ortiz Valmaseda 2012-02-09 05:11:43 Re: random_page_cost = 2.0 on Heroku Postgres