Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Re: Where do a ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 8 Topic 4028 of 4424
Post > Topic >>

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

by scrawford@[EMAIL PROTECTED] (Steve Crawford) Apr 28, 2008 at 09:34 AM

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.
>   
Go back to step zero - gather information that would be helpful in 
giving advice. For starters:
- What hardware do you currently have?
- What OS and version of PG?
- How big is the database?
- What is the nature of the workload (small queries or data-mining, how 
many simultaneous clients, transaction rate, etc.)?
- Is PG sharing the machine with other workloads?

Then edit your postgresql.conf file to gather data (see 
http://www.postgresql.org/docs/8.3/interactive/monitoring-stats.html).

With stat collection enabled, you can often find some low-hanging fruit 
like indexes that aren't used (look in pg_stat_user_indexes) - sometime 
because the query didn't case something in the where-clause correctly.

Also look at 
http://www.postgresql.org/docs/8.3/interactive/runtime-config-logging.html

- especially the log_min_duration_statement setting to find long-running 
queries. You will probably need to try different settings and watch the 
log. Logging impacts performance so don't just set to log everything and 
forget. You need to play with it.

Don't discount step 2 - you may find you can rewrite one inefficient but 
frequent query. Or add a useful index on the server.

Cheers,
Steve




-- 
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
 




 8 Posts in Topic:
Where do a novice do to make it run faster?
gentosaker@[EMAIL PROTECT  2008-04-28 17:56:27 
Re: Where do a novice do to make it run faster?
Dennis Muhlestein <djm  2008-04-28 10:10:35 
Re: Where do a novice do to make it run faster?
kometen@[EMAIL PROTECTED]  2008-04-28 18:19:30 
Re: Where do a novice do to make it run faster?
scrawford@[EMAIL PROTECTE  2008-04-28 09:34:14 
Re: Where do a novice do to make it run faster?
Chris Browne <cbbrowne  2008-04-28 12:35:18 
Re: Where do a novice do to make it run faster?
lists@[EMAIL PROTECTED]   2008-04-28 20:23:12 
Re: Where do a novice do to make it run faster?
gentosaker@[EMAIL PROTECT  2008-04-29 11:09:48 
Re: Where do a novice do to make it run faster?
tgl@[EMAIL PROTECTED] (T  2008-04-29 10:20:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 8:12:35 CST 2008.