Re: tunning strategy needed

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: hyelluas <helen_yelluas(at)mcafee(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: tunning strategy needed
Date: 2011-08-18 05:45:48
Message-ID: 4E4CA70C.9050209@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 18/08/2011 6:40 AM, hyelluas wrote:
> Hello,
>
> I have an old application that was written on Postgres 8.1.
> There are a few hundreds tables, 30-40 columns per table, hundreds of
> views, and all the sql is inside java code.
>
> We are moving it to 8.4, it seems to be VERY slow.
> There are 20-30 tables transactions - the objects are spread acrross
> multiple tables and some tables have data from different objects.
>
> I need a short term tuning strategy minimizing rewrite& redesign.
>
>

- Turn on auto explain and slow query logging

- Examine the slow queries and plans. Run them manually with EXPLAIN
ANALYZE. Check that the statistics make sense and if they're inaccurate,
increase the statistics targets on those columns/tables then re-ANALYZE.

- If the stats are accurate but the query is still slow, try playing
with the cost parameters and see if you get a better result, then test
those settings server-wide to see if they improve overall performance.

--
Craig Ringer

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2011-08-18 07:07:51 Re: Raid 5 vs Raid 10 Benchmarks Using bonnie++
Previous Message Craig Ringer 2011-08-18 05:35:56 Re: Raid 5 vs Raid 10 Benchmarks Using bonnie++