Re: Inserts or Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 8, 2012 at 20:22, Ofer Israeli <oferi@xxxxxxxxxxxxxx> 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.

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux