Re: Bundling postgreSQL with my Java application

From: justin <justin(at)emproshunts(dot)com>
To: "Saurabh Dave" <saurabhdave(at)gmail(dot)com>, "Guillaume Cottenceau" <gc(at)mnc(dot)ch>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Bundling postgreSQL with my Java application
Date: 2009-07-06 23:16:21
Message-ID: 4A5285C5.3020705@emproshunts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Saurabh Dave wrote:
<blockquote
cite="mid:fdd0c0f90907060017y334df602k4fff0acf07776d91(at)mail(dot)gmail(dot)com"
type="cite">
<div class="im">&gt;No offense intended - but have you looked at the
documentation for postgresql.conf?<br>
<br>
&gt;If you are going to include PostgreSQL in your application, I'd
highly recommend you &gt;understand what you are including. :-)<br>
<br>
</div>
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.<br>
Autovaccum is enabled by default in 8.3.7 , but i reduced the nap time
so that it happens more frequently.<br>
</blockquote>
As others have pointed tuning is not a caned answer&nbsp; hence all the
config options to start with.&nbsp; But to change the configuration to
something a bench mark must be made.&nbsp; The only way to do that is
identify the common SQL commands sent to the server then run explain
analyze&nbsp; so you know what the server is doing.&nbsp; Then post the the
results along with Config file and we can make suggestions <br>
<br>
There is&nbsp; <a class="moz-txt-link-freetext" href="http://wiki.postgresql.org/wiki/Performance_Optimization">http://wiki.postgresql.org/wiki/Performance_Optimization</a><br>
<br>
Greg Smith is working on a tuner&nbsp;
<a class="moz-txt-link-freetext" href="http://notemagnet.blogspot.com/2008/11/automating-initial-postgresqlconf.html">http://notemagnet.blogspot.com/2008/11/automating-initial-postgresqlconf.html</a><br>
<br>
But thats a monumental undertaking as one configuration setting for one
type of work load can be ruinousness to another work load.<br>
<br>
The one common theme is know the workload so the configuration
matches.&nbsp; <br>
<blockquote
cite="mid:fdd0c0f90907060017y334df602k4fff0acf07776d91(at)mail(dot)gmail(dot)com"
type="cite"><br>
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.<br>
</blockquote>
This boils down to know the&nbsp; work load. <br>
different kinds of work loads:&nbsp; <br>
&nbsp;&nbsp;&nbsp; A: more writing with very few&nbsp; reads.<br>
&nbsp;&nbsp;&nbsp; B: more reads that are simple queries and few complex quiers with
very few writes.&nbsp; There is a ratio to look at in my case 10000 reads
occur before next write So we have lots of indexes aimed at those
common queries.&nbsp; <br>
&nbsp;&nbsp;&nbsp; C: Complex queries taking minutes to hours to run on data warehouse
covering&nbsp; millions of records.<br>
&nbsp;&nbsp;&nbsp; D: equal work load between writes and reads.&nbsp; <br>
<br>
There are many kinds of workloads requiring different configurations.&nbsp; <br>
<blockquote
cite="mid:fdd0c0f90907060017y334df602k4fff0acf07776d91(at)mail(dot)gmail(dot)com"
type="cite"><br>
If there a utility that understands the system specification on
which postgres is going to run and change the paramters accordingly,
that would help.<br>
<br>
Thanks,<br>
<font color="#888888">Saurabh</font></blockquote>
&lt;snip&gt;<br>
<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 3.3 KB

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Craig Ringer 2009-07-07 04:51:14 Re: Six PostgreSQL questions from a pokerplayer
Previous Message Mark Mielke 2009-07-06 19:27:15 Re: Six PostgreSQL questions from a pokerplayer