Re: [PERFORM] Postgres not using array

2008-08-28 Thread Greg Smith
On Thu, 21 Aug 2008, Andr? Volpato wrote: So, what is slowing down is the CPU (Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz)..In practice, I have noticed that dual 1.8 is worse than single 3.0. We have another server wich is a Pentium D 3.0 GHz, that runs faster. Pentium D models are all dua

Re: [PERFORM] Postgres not using array

2008-08-22 Thread André Volpato
Gregory Stark escreveu: André Volpato <[EMAIL PROTECTED]> writes: I think we almost reached the tuning limit, without changing the schema. It's hard to tell from the plan you posted (and with only a brief look) but it looks to me like your query with that function is basi

Re: [PERFORM] Postgres not using array

2008-08-22 Thread Gregory Stark
André Volpato <[EMAIL PROTECTED]> writes: > Tom Lane escreveu: >>> We are guessing that a dual core 3.0GHz will beat up a quad core 2.2, >>> at least in this environmnent with less than 4 concurrent queryes. >> >> The most you could hope for from that is less than a 50% speedup. I'd >> suggest in

Re: [PERFORM] Postgres not using array

2008-08-21 Thread André Volpato
Tom Lane escreveu: We are guessing that a dual core 3.0GHz will beat up a quad core 2.2, at least in this environmnent with less than 4 concurrent queryes. The most you could hope for from that is less than a 50% speedup. I'd suggest investing some tuning effort first. Some rethinking of your

Re: [PERFORM] Postgres not using array

2008-08-21 Thread Tom Lane
=?ISO-8859-1?Q?Andr=E9_Volpato?= <[EMAIL PROTECTED]> writes: > Tom Lane escreveu: >> So I guess the question is "what is the bds_internacoes function, and >> why is it so slow?" > This function is quite fast: Well, "fast" is relative. It's not fast enough, or you wouldn't have been complaining

Re: [PERFORM] Postgres not using array

2008-08-21 Thread André Volpato
Tom Lane escreveu: =?ISO-8859-1?Q?Andr=E9_Volpato?= <[EMAIL PROTECTED]> writes: Explain output: HashAggregate (cost=19826.23..19826.96 rows=73 width=160) (actual time=11826.754..11826.754 rows=0 loops=1) -> Subquery Scan b2 (cost=19167.71..19817.21 rows=722 width=160) (actual time=11

Re: [PERFORM] Postgres not using array

2008-08-21 Thread Tom Lane
=?ISO-8859-1?Q?Andr=E9_Volpato?= <[EMAIL PROTECTED]> writes: > Explain output: > HashAggregate (cost=19826.23..19826.96 rows=73 width=160) (actual > time=11826.754..11826.754 rows=0 loops=1) >-> Subquery Scan b2 (cost=19167.71..19817.21 rows=722 width=160) > (actual time=11826.752..11826.

Re: [PERFORM] Postgres not using array

2008-08-21 Thread Mark Mielke
André Volpato wrote: In practice, I have noticed that dual 1.8 is worse than single 3.0. We have another server wich is a Pentium D 3.0 GHz, that runs faster. ... Postgres read the array in less than 1 sec, and the other 10s he takes 100% of CPU usage, wich is, in this case, one of the two cor

Re: [PERFORM] Postgres not using array

2008-08-21 Thread André Volpato
André Volpato escreveu: David Wilson escreveu: On Wed, Aug 20, 2008 at 2:30 PM, André Volpato <[EMAIL PROTECTED]> wrote: The CPU is 100% used since a few hours ago. Can anyone tell why? Sounds like you've just got a CPU bound query. The data may even all be in cache. Some informatio

Re: [PERFORM] Postgres not using array

2008-08-20 Thread André Volpato
David Wilson escreveu: On Wed, Aug 20, 2008 at 2:30 PM, André Volpato <[EMAIL PROTECTED]> wrote: The CPU is 100% used since a few hours ago. Can anyone tell why? Sounds like you've just got a CPU bound query. The data may even all be in cache. Some information on database size, alon

Re: [PERFORM] Postgres not using array

2008-08-20 Thread David Wilson
On Wed, Aug 20, 2008 at 2:30 PM, André Volpato <[EMAIL PROTECTED]> wrote: > The CPU is 100% used since a few hours ago. Can anyone tell why? Sounds like you've just got a CPU bound query. The data may even all be in cache. Some information on database size, along with EXPLAIN results for your qu