Re: how to find which tables required indexes in postgresql

From: Shaun Thomas <sthomas(at)optionshouse(dot)com>
To: Zahid Quadri <zahid(dot)quadri(at)cloverinfotech(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: how to find which tables required indexes in postgresql
Date: 2013-04-10 14:34:35
Message-ID: 5165787B.6010303@optionshouse.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/10/2013 06:31 AM, Zahid Quadri wrote:

> please suggest if there is any way which i can find which tables need
> indexes in postgresql.

If you have 8.4 or newer, you can look in pg_stat_statements for queries
that use a lot of time. Check the where clauses for columns or
transforms that can be indexed.

Of course, you have to install it first. Take a look here:

http://www.postgresql.org/docs/8.4/static/pgstatstatements.html

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-676-8870
sthomas(at)optionshouse(dot)com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email

In response to

Browse pgsql-general by date

  From Date Subject
Next Message P. Broennimann 2013-04-10 14:39:21 Re: Characters
Previous Message Adrian Klaver 2013-04-10 14:17:54 Re: Characters