Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Willo van der Merwe
Merlin Moncure wrote: On 8/29/06, Willo van der Merwe [EMAIL PROTECTED] wrote: and it has 743321 rows and a explain analyze select count(*) from property_values; you have a number of options: All good ideas and I'll be sure to implement them later. I am curious why you need to query the

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Luke Lonergan
Currently the load looks like this: Cpu0 : 96.8% us, 1.9% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 1.0% si Cpu1 : 97.8% us, 1.6% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 0.3% si Cpu2 : 96.8% us, 2.6% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 0.3% si Cpu3 : 96.2% us,

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Willo van der Merwe
Rusty Conover wrote: On Aug 29, 2006, at 7:52 AM, Willo van der Merwe wrote: Hi, We're running PostgreSQL 8.1.4 on CentOS 4 (Linux version 2.6.9-34.0.1.ELsmp). Hardware specs: 2x AMD Dual-Core Opteron 270 Italy 1Ghz HT 2 x 1MB L2 Cache Socket 940 4 GB Registered ECC PC3200 DDR RAM

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Willo van der Merwe
Luke Lonergan wrote: Currently the load looks like this: Cpu0 : 96.8% us, 1.9% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 1.0% si Cpu1 : 97.8% us, 1.6% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 0.3% si Cpu2 : 96.8% us, 2.6% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 0.3% si Cpu3

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Luke Lonergan
AM To: Luke Lonergan Cc: Merlin Moncure; pgsql-performance@postgresql.org Subject: Re: [PERFORM] PostgreSQL performance issues Luke Lonergan wrote: Currently the load looks like this: Cpu0 : 96.8% us, 1.9% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 1.0% si Cpu1 : 97.8% us, 1.6

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Alex Hayward
On Wed, 30 Aug 2006, Willo van der Merwe wrote: Merlin Moncure wrote: On 8/29/06, Willo van der Merwe [EMAIL PROTECTED] wrote: and it has 743321 rows and a explain analyze select count(*) from property_values; you have a number of options: All good ideas and I'll be sure to

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Willo van der Merwe
? - Luke -Original Message- From: Willo van der Merwe [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 4:35 AM To: Luke Lonergan Cc: Merlin Moncure; pgsql-performance@postgresql.org Subject: Re: [PERFORM] PostgreSQL performance issues Luke Lonergan wrote: Currently the load

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Willo van der Merwe
Alex Hayward wrote: On Wed, 30 Aug 2006, Willo van der Merwe wrote: Merlin Moncure wrote: On 8/29/06, Willo van der Merwe [EMAIL PROTECTED] wrote: and it has 743321 rows and a explain analyze select count(*) from property_values; you have a number of options:

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Dave Cramer
On 30-Aug-06, at 7:35 AM, Willo van der Merwe wrote: Luke Lonergan wrote: Currently the load looks like this: Cpu0 : 96.8% us, 1.9% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 1.0% si Cpu1 : 97.8% us, 1.6% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 0.3% si Cpu2 : 96.8% us, 2.6%

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Willo van der Merwe
Dave Cramer wrote: On 30-Aug-06, at 7:35 AM, Willo van der Merwe wrote: Luke Lonergan wrote: Currently the load looks like this: Cpu0 : 96.8% us, 1.9% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 1.0% si Cpu1 : 97.8% us, 1.6% sy, 0.0% ni, 0.3% id, 0.0% wa,

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Dave Dutcher
Title: Message That's an interesting situation. Your CPU's are pegged, and you're hardly doing any IO. I wonder if there is some ineficient query, or if its just very high query volume. Maybe you could try setting log_min_duration_statement to try to track down the slowest of the queries.

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Willo van der Merwe
Dave Dutcher wrote: That's an interesting situation. Your CPU's are pegged, and you're hardly doing any IO. I wonder if there is some ineficient query, or if its just very high query volume. Maybe you could try setting log_min_duration_statement to try to track down the slowest of the

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Merlin Moncure
On 8/30/06, Willo van der Merwe [EMAIL PROTECTED] wrote: This was just an example. All queries have slowed down. Could it be that I've reached some cut-off and now my disk is thrashing? Currently the load looks like this: Cpu0 : 96.8% us, 1.9% sy, 0.0% ni, 0.3% id, 0.0% wa, 0.0% hi, 1.0%

Re: [PERFORM] PostgreSQL performance issues

2006-08-30 Thread Alan Hodgson
On Wednesday 30 August 2006 03:48, Willo van der Merwe [EMAIL PROTECTED] wrote: Hi Rusty, Good ideas and I've implemented some of them, and gained about 10%. I'm still sitting on a load avg of about 60. Any ideas on optimizations on my postgresql.conf, that might have an effect? If all of

Re: [PERFORM] PostgreSQL performance issues

2006-08-29 Thread A. Kretschmer
am Tue, dem 29.08.2006, um 15:52:50 +0200 mailte Willo van der Merwe folgendes: and it has 743321 rows and a explain analyze select count(*) from property_values; QUERY PLAN

Re: [PERFORM] PostgreSQL performance issues

2006-08-29 Thread Joshua D. Drake
4 1/2 seconds for a count(*) ? This seems a bit rough - is there anything else I can try to optimize my Database? You can imagine that slightly more complex queries goes out the roof. Well a couple of things. 1. You put all your money in the wrong place.. 1 hard drive!!??!! 2. What is your

Re: [PERFORM] PostgreSQL performance issues

2006-08-29 Thread Willo van der Merwe
Joshua D. Drake wrote: 4 1/2 seconds for a count(*) ? This seems a bit rough - is there anything else I can try to optimize my Database? You can imagine that slightly more complex queries goes out the roof. Well a couple of things. 1. You put all your money in the wrong place.. 1 hard

Re: [PERFORM] PostgreSQL performance issues

2006-08-29 Thread PFC
4 1/2 seconds for a count(*) ? Is this a real website query ? Do you need this query ? ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [PERFORM] PostgreSQL performance issues

2006-08-29 Thread A. Kretschmer
am Tue, dem 29.08.2006, um 16:55:11 +0200 mailte Willo van der Merwe folgendes: 4 1/2 seconds for a count(*) ? This seems a bit rough - is there anything else Because of MVCC. http://www.thescripts.com/forum/thread173678.html http://www.varlena.com/GeneralBits/120.php

Re: [PERFORM] PostgreSQL performance issues

2006-08-29 Thread Rusty Conover
On Aug 29, 2006, at 7:52 AM, Willo van der Merwe wrote: Hi, We're running PostgreSQL 8.1.4 on CentOS 4 (Linux version 2.6.9-34.0.1.ELsmp). Hardware specs: 2x AMD Dual-Core Opteron 270 Italy 1Ghz HT 2 x 1MB L2 Cache Socket 940 4 GB Registered ECC PC3200 DDR RAM SuperMicro Server-Class 1U AS1020S

Re: [PERFORM] PostgreSQL performance issues

2006-08-29 Thread Codelogic
On Tue, 2006-08-29 at 15:52 +0200, Willo van der Merwe wrote: (cost=0.00..51848.56 rows=1309356 width=0) It is going through way more number of rows than what is returned by the count(*). It appears that you need to VACUUM the table (not VACUUM ANALYZE). ---(end of

Re: [PERFORM] PostgreSQL performance issues

2006-08-29 Thread Merlin Moncure
On 8/29/06, Willo van der Merwe [EMAIL PROTECTED] wrote: and it has 743321 rows and a explain analyze select count(*) from property_values; you have a number of options: 1. keep a sequence on the property values and query it. if you want exact count you must do some clever locking however.