Re: [PERFORM] select on 1milion register = 6s

2007-08-01 Thread Jan Dittmer
Scott Marlowe wrote: random_page_cost = 1# units are one sequential page fetch Seldom if ever is it a good idea to bonk the planner on the head with random_page_cost=1. setting it to 1.2 ot 1.4 is low enough, but 1.4 to 2.0 is more realistic. Which is probably the

Re: [PERFORM] Better way to write aggregates?

2006-04-21 Thread Jan Dittmer
Jim Buttafuoco wrote: Jan, I write queries like this CREATE VIEW parent_childs AS SELECT c.parent, count(c.state) as childtotal, sum(case when c.state = 1 then 1 else 0 end) as childstate1, sum(case when c.state = 2 then 1 else 0 end) as childstate2,

Re: [PERFORM] which dual-CPU hardware/OS is fastest for PostgreSQL?

2005-01-14 Thread Jan Dittmer
Greg Stark wrote: Jan Dittmer [EMAIL PROTECTED] writes: You could always do raid 1 over raid 0, with newer kernels (2.6ish) there is even a dedicated raid10 driver. Aren't you much better off doing raid 0 over raid 1? With raid 1 over raid 0 you're mirroring two stripe sets

Re: [PERFORM] which dual-CPU hardware/OS is fastest for PostgreSQL?

2005-01-13 Thread Jan Dittmer
Joshua D. Drake wrote: RAID controllers tend to use i960 or StrongARM CPUs that run at speeds that _aren't_ all that impressive. With software RAID, you can take advantage of the _enormous_ increases in the speed of the main CPU. I don't know so much about FreeBSD's handling of this, but on

Re: [PERFORM] Anything to be gained from a 'Postgres Filesystem'?

2004-10-21 Thread Jan Dittmer
Neil Conway wrote: Also, I would imagine Win32 provides some means to inform the kernel about your expected I/O pattern, but I haven't checked. Does anyone know of any other relevant APIs? See CreateFile, Parameter dwFlagsAndAttributes