X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 87F0B5641D for ; Tue, 8 Mar 2005 17:51:16 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 46679-06 for ; Tue, 8 Mar 2005 17:51:09 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by svr1.postgresql.org (Postfix) with ESMTP id 5AC535636F for ; Tue, 8 Mar 2005 17:51:08 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 70so1854406wra for ; Tue, 08 Mar 2005 09:51:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=Hn/Z4S4FgWVh5/GiVda05yEzqqQXagl6O+zFUJ4CLE851oC6i+ssr+zUpllz9AhWWmTtut82IFjUWnWKV3GSEoMIgiOeRVAeMN0ASecYPa6kMX5e4ikDXNXYZHdlaVltf3+7eMT42Y/bnBpYt2yp+waQU6F4jZhJnvWrCZuRkvk= Received: by 10.54.41.73 with SMTP id o73mr62418wro; Tue, 08 Mar 2005 09:51:08 -0800 (PST) Received: by 10.54.38.22 with HTTP; Tue, 8 Mar 2005 09:51:08 -0800 (PST) Message-ID: <6bf1b0a0050308095142eef89b@mail.gmail.com> Date: Tue, 8 Mar 2005 23:21:08 +0530 From: Prajakt Deolasee Reply-To: Prajakt Deolasee To: pgsql-jdbc@postgresql.org Subject: Re: Postgres is slow In-Reply-To: <422DE271.5010701@hogranch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <6bf1b0a005030805495ec76763@mail.gmail.com> <422DE271.5010701@hogranch.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.304 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200503/69 X-Sequence-Number: 12462 Thanks guys.. I will try of the suggested steps. But one thing that I do not understand that why should the performance deteriorate with exactly same data with subsequent tests. And its juts gets worse as I keep running it. > also, the defaults in $PGDATA/postgresql.conf in 7.4 are *VERY* inefficient. > there are a few key parameters that can make a significant difference in > overall performance. John, do you have any idea which parameters to change? I tried similar tests also against PSQL 8.0 as well. But the results are exactly same. My final usage is going to be exteremly high. I would need something like 1000 inserts/updates per sec. Do you think PSQL will scale? Can the indexing on the byte array be one of the issue? -Prajakt On Tue, 08 Mar 2005 09:35:45 -0800, John R Pierce wrote: > >>I am using Postgres 7.4 on Fedora 3.0. It is running with the default > >>configuration. > .... > > Probably this is not the right list for this. > > Did you run vacuum after inserting the records? > > Check your statement with explain analyze, it will show you why is it > > slow. > > also, check serverlog in the data directory (/var/pgsql/data is the > Redhat/Fedora default, I believe). If you're logging lots of errors, that file > will grow, and they don't manage it. > > also, the defaults in $PGDATA/postgresql.conf in 7.4 are *VERY* inefficient. > there are a few key parameters that can make a significant difference in > overall performance. > > and, crontab (from the postgres user account) a vacuumdb every hour or so if > you're doing lots of activity. once a day or week, do a vacuumdb -z to > reindex stuff. > > and, shut postgres down, mv the $PGDATA directory to a different dedicated > physical disk drive, and symlink it, then restart postgres. > > I've found that 7.x pgsql databases periodically need to be pg_dump'd, dropdb, > then reloaded from the dump to continue to perform well... on a heavy use web > server database which includes a busy user forum, I find doing this about 2-3 > times a year keeps things smooth. there may be a better way to clean them up, > but I've not found it. > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster >