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

Re: Where do a novice do to make it run faster?

From: Dennis Muhlestein <djmuhlestein(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Where do a novice do to make it run faster?
Date: 2008-04-28 16:10:35
Message-ID: fv4stq$2hd0$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-performance
A B wrote:
> So, it is time to improve performance, it is running to slow.
> AFAIK (as a novice) there are a few general areas:
> 
> 1) hardware
> 2) rewriting my queries and table structures
> 3) using more predefined queries
> 4) tweek parameters in the db conf files
> 
> Of these points:
> 1) is nothing I can do about right now, but in the future perhaps.
> 2) will be quite hard right now since there is more code than time.
> 3) almost like 2 but perhaps more do-able with the current constraints.
> 4) This seems to be the easiest one to start with...
> 
> So what should I do/read concerning point 4?
> If you have other good suggestions  I'd be very interested in that.
> 
> Thank you :-)
> 

1st, change your log settings log_min_duration_statement to something 
like 1000 (one second).  This will allow you to see which statements 
take the longest.

2nd.  Use EXPLAIN ANALYZE on those statements to determine what is 
taking a long time and focus on optimizing those statements that take 
the longest to execute.

That ought to get you a long way down the road.

-Dennis

In response to

pgsql-performance by date

Next:From: Claus GuttesenDate: 2008-04-28 16:19:30
Subject: Re: Where do a novice do to make it run faster?
Previous:From: Josh BerkusDate: 2008-04-28 16:07:36
Subject: Re: Benchmarks WAS: Sun Talks about MySQL

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