Skip site navigation (1) Skip section navigation (2)

Re: indexes make other queries slow!

From: "Jason Coene" <jcoene(at)gotfrag(dot)com>
To: "'Qing Zhao'" <qzhao(at)supplyfx(dot)com>
Cc: "'Postgresql Performance'" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: indexes make other queries slow!
Date: 2004-09-16 21:36:46
Message-ID: 200409162136.i8GLagv2015192@ms-smtp-03.nyroc.rr.com (view raw or flat)
Thread:
Lists: pgsql-performance
> My guess is that all the queries that involves the columns  that are
> being indexed need to
> be rewritten to use the newly created indexes to avoid the performance
> issues. The reason
> is that REINDEX does not help either. Does it make sense?
> 

Qing,

Generally, adding new indexes blindly will hurt performance, not help it.

More indexes mean more work during INSERT/UPDATE.  That could easily be
hampering your performance if you have a high INSERT/UPDATE volume.

Run your queries through EXPLAIN ANALYZE to make sure they're using the
right indexes.  Take a look at the pg_stat_user_indexes table to see what
indexes are simply not being used.

Jason


In response to

pgsql-performance by date

Next:From: J. Andrew RogersDate: 2004-09-16 21:59:12
Subject: Re: Partitioning
Previous:From: Josh BerkusDate: 2004-09-16 21:24:28
Subject: Re: indexes make other queries slow!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group