Re: Bundling postgreSQL with my Java application

From: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
To: Saurabh Dave <saurabhdave(at)gmail(dot)com>
Cc: Guillaume Cottenceau <gc(at)mnc(dot)ch>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Bundling postgreSQL with my Java application
Date: 2009-07-06 08:27:30
Message-ID: 4A51B572.5080504@mark.mielke.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 07/06/2009 03:17 AM, Saurabh Dave wrote:
> >No offense intended - but have you looked at the documentation for
> postgresql.conf?
>
> >If you are going to include PostgreSQL in your application, I'd
> highly recommend you >understand what you are including. :-)
>
> I had a look into the documentation of postgres.conf, and tried a lot
> with changing paramters I thought would improve the performance, but
> in vain.
> Autovaccum is enabled by default in 8.3.7 , but i reduced the nap time
> so that it happens more frequently.
>
> My personal opinion is that certain parameters in postgres.conf are
> simply too technical in nature for a application developer like me, it
> becomes more of a trial and error kind of frustrating process.
>
> If there a utility that understands the system specification on which
> postgres is going to run and change the paramters accordingly, that
> would help.

If autovacuum is on - then I suspect your problem would not be addressed
by tweaking postgresql.conf. You'll have to analyze the queries that are
taking longer than you expect. Run them with "explain analyze" in front
and post the results. Provide table structure information.

It's possible tweaking postgresql.conf would give you a performance
boost - but it would probably be temporary. That is, getting 1 x 5%
speedup here and 1 x 10% there will be useless if the actual query is
becoming slower by 100% every few days.

The problem needs to be understood.

For what it's worth, we have some fairly busy systems that have used
PostgreSQL 8.0 / 8.1 out of the box, the administrators forgot to run
vacuum / analyze, and the system *still* performed well months later.
PostgreSQL is pretty good even without non-optimal configuration and
even without database maintenance. If autovacuum is really running for
you - I would look as to whether you have the right indexes defined
and/or whether you are actually using them?

Cheers,
mark

--
Mark Mielke<mark(at)mielke(dot)cc>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Carey 2009-07-06 08:43:01 Re: Six PostgreSQL questions from a pokerplayer
Previous Message Saurabh Dave 2009-07-06 07:17:55 Re: Bundling postgreSQL with my Java application