Re: [PERFORM] table partitioning and select max(id)

2011-02-05 Thread Tobias Brox
[Greg Smith] Here's the comment from that describing the main technique used to fix it: This module tries to replace MIN/MAX aggregate functions by subqueries of the form (SELECT col FROM tab WHERE ... ORDER BY col ASC/DESC LIMIT 1) Huh ... that sounds a bit like pg 8.0 to me ;-) I

Re: [HACKERS] [PERFORM] Slow count(*) again...

2011-02-05 Thread Scott Marlowe
On Fri, Feb 4, 2011 at 11:37 PM, Robert Haas robertmh...@gmail.com wrote: On Sat, Feb 5, 2011 at 12:46 AM,  da...@lang.hm wrote: Actually for me the main con with streaming analyze is that it adds significant CPU burden to already not too fast load process. Especially if it's automatically

Re: [PERFORM] table partitioning and select max(id)

2011-02-05 Thread Greg Smith
Tobias Brox wrote: I did test select id from table order by id desc limit 1 on my parent table yesterday, it would still do the seq-scan. Even adding a where-restriction to make sure only one partition was queried I still got the seq-scan. Right; you actually have to direct the query

Re: [HACKERS] [PERFORM] Slow count(*) again...

2011-02-05 Thread Greg Smith
Scott Marlowe wrote: With a 24 drive RAID-10 array that can read at ~1GB/s I am almost always CPU bound during copies. This isn't wholly bad as it leaves spare IO for the rest of the machine so regular work carries on just fine. And you don't need nearly that much I/O bandwidth to reach

Re: [PERFORM] How to best use 32 15k.7 300GB drives?

2011-02-05 Thread Віталій Тимчишин
2011/2/4 Robert Haas robertmh...@gmail.com On Fri, Feb 4, 2011 at 4:19 AM, Vitalii Tymchyshyn tiv...@gmail.com wrote: Why do you expect such a invasive code changes? I know little about postgresql code layering, but what I propose (with changing delete to truncate) is: 1) Leave tuple

Re: [PERFORM] Really really slow select count(*)

2011-02-05 Thread Pierre C
On Fri, 04 Feb 2011 21:37:56 +0100, Shaun Thomas stho...@peak6.com wrote: On 02/04/2011 02:14 PM, felix wrote: oh and there in the footnotes to django they say dont' forget to run the delete expired sessions management every once in a while. thanks guys. Oh Django... :) it won't run now

Re: [PERFORM] Write-heavy pg_stats_collector on mostly idle server

2011-02-05 Thread Cédric Villemain
2011/2/4 Josh Berkus j...@agliodbs.com: All, Seeing an issue which is new on me.  On a mostly idle PostgreSQL server, the stats collector is rewriting the entire stats file twice per second. Version: 8.4.4 Server: Ubuntu, kernel 2.6.32 Server set up: ApacheMQ server.  25 databases, each of