Re: [PERFORM] Performance Bottleneck

2004-08-04 Thread Pierre-Frédéric Caillaud
Apache processes running for 30 minutes ?. My advice : use frames and Javascript ! In your webpage, you have two frames : "content" and "refresh". "content" starts empty (say, just a title on top of the page). "refresh" is refreshed every five seconds from a script on your

Re: [PERFORM] Performance Bottleneck

2004-08-04 Thread Martin Foster
Gaetano Mendola wrote: Martin Foster wrote: Gaetano Mendola wrote: Martin Foster wrote: I run a Perl/CGI driven website that makes extensive use of PostgreSQL (7.4.3) for everything from user information to formatting and display of specific sections of the site. The server itself, is a dual p

Re: [PERFORM] Performance Bottleneck

2004-08-04 Thread Martin Foster
Michael Adler wrote: On Wed, Aug 04, 2004 at 03:49:11AM +, Martin Foster wrote: Also note that some of these scripts run for longer durations even if they are web based.Some run as long as 30 minutes, making queries to the database from periods of wait from five seconds to twenty-five se

FW: [PERFORM] Tuning queries on large database

2004-08-04 Thread Merlin Moncure
[forwarded to performance] > The result is that for "short queries" (Q1 and Q2) it runs in a few > seconds on both Oracle and PG. The difference becomes important with > Q3 : 8 seconds with oracle > 80 sec with PG > and too much with Q4 : 28s with oracle >17m20s with P

Re: [PERFORM] Tuning queries on large database

2004-08-04 Thread Pierre-Frédéric Caillaud
You often make sums. Why not use separate tables to cache these sums by month, by poste, by whatever ? Rule on insert on the big table updates the cache tables. ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose

Re: [PERFORM] Tuning queries on large database

2004-08-04 Thread Pierre-Frédéric Caillaud
not so bad for oracle. What about for PG ? How data is stored I agree with the datatype issue. Smallint, bigint, integer... add a constraint... Also the way order of the records in the database is very important. As you seem to have a very large static population in your table, you should

Re: [PERFORM] Performance Bottleneck

2004-08-04 Thread Michael Adler
On Wed, Aug 04, 2004 at 03:49:11AM +, Martin Foster wrote: > Also note that some of these scripts run for longer durations even if > they are web based.Some run as long as 30 minutes, making queries to > the database from periods of wait from five seconds to twenty-five > seconds. Un

Re: [PERFORM] The black art of postgresql.conf tweaking

2004-08-04 Thread Thomas Swan
Janning Vygen wrote: Am Mittwoch, 4. August 2004 14:45 schrieb Paul Serby: Apache on the Web server can take up to 300 connections and PHP is using pg_pconnect Postgres is set with the following. max_connections = 300 shared_buffers = 38400 sort_mem = 12000 But Apache is still maxing out the no

Re: [PERFORM] Tuning queries on large database

2004-08-04 Thread Valerie Schneider DSI/DEV
>X-Original-To: [EMAIL PROTECTED] >X-Authentication-Warning: houston.familyhealth.com.au: chriskl owned process doing -bs >Date: Wed, 4 Aug 2004 21:21:51 +0800 (WST) >From: Christopher Kings-Lynne <[EMAIL PROTECTED]> >To: Valerie Schneider DSI/DEV <[EMAIL PROTECTED]> >Cc: [EMAIL PROTECTED], <[EMA

Re: [PERFORM] The black art of postgresql.conf tweaking

2004-08-04 Thread Paul Thomas
On 04/08/2004 13:45 Paul Serby wrote: Can anyone give a good reference site/book for getting the most out of your postgres server. All I can find is contradicting theories on how to work out your settings. This is what I followed to setup our db server that serves our web applications. http:/

Re: [PERFORM] The black art of postgresql.conf tweaking

2004-08-04 Thread Janning Vygen
Am Mittwoch, 4. August 2004 14:45 schrieb Paul Serby: > Apache on the Web server can take up to 300 connections and PHP is using > pg_pconnect > > Postgres is set with the following. > > max_connections = 300 > shared_buffers = 38400 > sort_mem = 12000 > > But Apache is still maxing out the non-s

Re: [PERFORM] Tuning queries on large database

2004-08-04 Thread Rod Taylor
On Wed, 2004-08-04 at 08:44, Valerie Schneider DSI/DEV wrote: > Hi, > > I have some problem of performance on a PG database, and I don't > know how to improve. I Have two questions : one about the storage > of data, one about tuning queries. If possible ! > > My job is to compare Oracle and Postg

Re: [PERFORM] Tuning queries on large database

2004-08-04 Thread Christopher Kings-Lynne
> sort_mem = 5 That is way, way too large. Try more like 5000 or lower. > num_poste | numeric(9,0)| not null For starters numerics are really, really slow compared to integers. Why aren't you using an integer for this field since youhave '0' decimal places. > sche

Re: [PERFORM] The black art of postgresql.conf tweaking

2004-08-04 Thread Michal Taborsky
Paul Serby wrote: Apache on the Web server can take up to 300 connections and PHP is using pg_pconnect max_connections = 300 But Apache is still maxing out the non-super user connection limit. Don't forget also that some connections are reserved for superusers (usually 2), so if you want 300 us

Re: [PERFORM] The black art of postgresql.conf tweaking

2004-08-04 Thread Jeff
On Aug 4, 2004, at 8:45 AM, Paul Serby wrote: Apache on the Web server can take up to 300 connections and PHP is using pg_pconnect Postgres is set with the following. max_connections = 300 shared_buffers = 38400 sort_mem = 12000 But Apache is still maxing out the non-super user connection limit.

[PERFORM] Tuning queries on large database

2004-08-04 Thread Valerie Schneider DSI/DEV
Hi, I have some problem of performance on a PG database, and I don't know how to improve. I Have two questions : one about the storage of data, one about tuning queries. If possible ! My job is to compare Oracle and Postgres. All our operational databases have been running under Oracle for about

[PERFORM] The black art of postgresql.conf tweaking

2004-08-04 Thread Paul Serby
Can anyone give a good reference site/book for getting the most out of your postgres server. All I can find is contradicting theories on how to work out your settings. This is what I followed to setup our db server that serves our web applications. http://www.phpbuilder.com/columns/smith2001082