Re: [PERFORM] Shouldn't we have a way to avoid "risky" plans?

2011-04-19 Thread Josh Berkus
On 4/19/11 7:29 AM, Robert Haas wrote: > Another thought is that we might want to consider reducing > autovacuum_analyze_scale_factor. The root of the original problem > seems to be that the table had some data churn but not enough to cause > an ANALYZE. Now, if the data churn is random, auto-ana

Re: [PERFORM] How to configure a read-only database server?

2011-04-19 Thread philippe
hi, Perhaps in postgresql.conf : default_transaction_read_only regards philippe Le 19/04/2011 00:08, Stefan Keller a écrit : I browsed the faq and looked at PostgreSQL performance books but I could not find the obvious: How to configure a read-only database server? I have a single-disk vi

Re: [PERFORM] How to configure a read-only database server?

2011-04-19 Thread Greg Smith
On 04/18/2011 06:08 PM, Stefan Keller wrote: * What about wal_level and archive_mode? Presumably you don't care about either of these. wal_level=minimal, archive_mode=off. The other non-obvious thing you should do in this situation is do all the database maintenance in one big run afte

Re: [PERFORM] Shouldn't we have a way to avoid "risky" plans?

2011-04-19 Thread Robert Haas
On Fri, Mar 25, 2011 at 10:24 AM, Tom Lane wrote: > Josh Berkus writes: >>> If the planner starts operating on the basis of worst case rather than >>> expected-case performance, the complaints will be far more numerous than >>> they are today. > >> Yeah, I don't think that's the way to go.  The o

Re: [PERFORM] Shouldn't we have a way to avoid "risky" plans?

2011-04-19 Thread Robert Haas
On Thu, Mar 24, 2011 at 4:30 PM, Nathan Boley wrote: > Another approach, that hasn't been suggested yet, is some Bayesian > update method. There, rather than calculating a specific parameter > value ( like ndistinct ), you try to store the entire distribution and > choose the plan that minimizes c

Re: [PERFORM] postgresql random io test with 2 SSD Kingston V+100 500GB in (software) Raid1

2011-04-19 Thread Laurent Laborde
On Tue, Apr 19, 2011 at 3:21 PM, Nicholson, Brad (Toronto, ON, CA) wrote: >> -Original Message- >> From: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance- >> ow...@postgresql.org] On Behalf Of Laurent Laborde >> Sent: Tuesday, April 19, 2011 8:37 AM >> To: pgsql-performance

Re: [PERFORM] postgresql random io test with 2 SSD Kingston V+100 500GB in (software) Raid1

2011-04-19 Thread Nicholson, Brad (Toronto, ON, CA)
> -Original Message- > From: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance- > ow...@postgresql.org] On Behalf Of Laurent Laborde > Sent: Tuesday, April 19, 2011 8:37 AM > To: pgsql-performance@postgresql.org > Subject: Re: [PERFORM] postgresql random io test with 2 SSD Ki

Re: [PERFORM] postgresql random io test with 2 SSD Kingston V+100 500GB in (software) Raid1

2011-04-19 Thread Laurent Laborde
1 SSD Kingston V+100 250GB, no raid. /home/pgiosim-0.5/pgiosim -w1 -a1 -v -b 100 /home/ssd/big1 Write Mode: 1% Stallcheck at 1.00 Verbose Unknown units of blocks Arg: 1 Read 100 blocks Added /home/ssd/big1 3.57%, 35720 read,365 written, 28567.73kB/sec 3570.97 iops 6.14%, 25684 r

Re: [PERFORM] postgresql random io test with 2 SSD Kingston V+100 500GB in (software) Raid1

2011-04-19 Thread Laurent Laborde
On Tue, Apr 19, 2011 at 2:07 PM, Greg Smith wrote: > On 04/19/2011 05:15 AM, Laurent Laborde wrote: >> >> 2 kingston V+100 500GB 4x250GB in Raid10 (see my 2nd post) > Thanks for the performance report.  The V+100 is based on a Toshiba T6UG1XBG > controller, and it doesn't have any durable cache

Re: [PERFORM] postgresql random io test with 2 SSD Kingston V+100 500GB in (software) Raid1

2011-04-19 Thread Greg Smith
On 04/19/2011 05:15 AM, Laurent Laborde wrote: 2 kingston V+100 500GB Thanks for the performance report. The V+100 is based on a Toshiba T6UG1XBG controller, and it doesn't have any durable cache from either a battery or capacitor. As such, putting a database on that drive is very risk

[PERFORM] Re: postgresql random io test with 2 SSD Kingston V+100 500GB in (software) Raid1

2011-04-19 Thread Laurent Laborde
Sorry, it's not 2x512GB in Raid1 but 4x256GB in raid10 -- Laurent "ker2x" Laborde Sysadmin & DBA at http://www.over-blog.com/ -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] big distinct clause vs. group by

2011-04-19 Thread Claudio Freire
On Tue, Apr 19, 2011 at 11:07 AM, Robert Klemme wrote: > I find that slightly contradictory: either you do care about the > values then your business requirements dictate the aggregate function. >  If you only want to pick any value actually in the table but do not > care about which one (e.g. MIN

[PERFORM] postgresql random io test with 2 SSD Kingston V+100 500GB in (software) Raid1

2011-04-19 Thread Laurent Laborde
2 kingston V+100 500GB Soft RAID1 (md) ioscheduler [noop] ext3 Linux pro-cdn1 2.6.26-2-amd64 #1 SMP Tue Jan 25 05:59:43 UTC 2011 x86_64 GNU/Linux FilesystemSize Used Avail Use% Mounted on /dev/md4 452G 301G 128G 71% /home/ssd Random 8KB read/write with 1% writ

Re: [PERFORM] big distinct clause vs. group by

2011-04-19 Thread Robert Klemme
On Tue, Apr 19, 2011 at 10:47 AM, Uwe Bartels wrote: > Oh, I do care about these columns. > But by using an group by on the key columns, I cannot select the columns as > they are. Otherwise you get an error message. > So I have to use an aggregate functionlike min(). I find that slightly contradi

Re: [PERFORM] How to configure a read-only database server?

2011-04-19 Thread Robert Klemme
On Tue, Apr 19, 2011 at 12:08 AM, Stefan Keller wrote: > I browsed the faq and looked at PostgreSQL performance books but I > could not find the obvious: > How to configure a read-only database server? > > I have a single-disk virtual Linux system and a read-only dataset > which is exposed to inte

Re: [PERFORM] big distinct clause vs. group by

2011-04-19 Thread Uwe Bartels
Hi Robert, Oh, I do care about these columns. But by using an group by on the key columns, I cannot select the columns as they are. Otherwise you get an error message. So I have to use an aggregate functionlike min(). Best... Uwe On 19 April 2011 10:24, Robert Klemme wrote: > On Mon, Apr 18,

Re: [PERFORM] big distinct clause vs. group by

2011-04-19 Thread Robert Klemme
On Mon, Apr 18, 2011 at 7:13 PM, Uwe Bartels wrote: > the aggregate function I was talking about is the function I need to use for > the non-group by columns like min() in my example. > There are of course several function to choose from, and I wanted to know > which causes as less as possible res