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 s

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

2005-01-14 Thread Merlin Moncure
Greg wrote: > Josh Berkus writes: > > > Merlin, > > > > > I think the danger about SATA is that many SATA components are not > > > server quality, so you have to be more careful about what you buy. > For > > > example, you can't just assume your SATA backplane has hot swap lights > > > (got bit b

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

2005-01-14 Thread Greg Stark
Josh Berkus writes: > Merlin, > > > I think the danger about SATA is that many SATA components are not > > server quality, so you have to be more careful about what you buy. For > > example, you can't just assume your SATA backplane has hot swap lights > > (got bit by this one myself, heh). >

Re: [PERFORM] sum of all values

2005-01-14 Thread Richard Huxton
Madison Kelly wrote: Richard Huxton wrote: Madison Kelly wrote: Hi all, Is there a fast(er) way to get the sum of all integer values for a certain condition over many thousands of rows? What I am currently doing is this (which takes ~5-10sec.): OK, I'm assuming you've configured PG to your sati

[PERFORM] Index on a function and SELECT DISTINCT

2005-01-14 Thread Adrian Holovaty
If I have this table, function and index in Postgres 7.3.6 ... """ CREATE TABLE news_stories ( id serial primary key NOT NULL, pub_date timestamp with time zone NOT NULL, ... ) CREATE OR REPLACE FUNCTION get_year_trunc(timestamp with time zone) returns timestamp with time zone AS 'SEL

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

2005-01-14 Thread Josh Berkus
Merlin, > I think the danger about SATA is that many SATA components are not > server quality, so you have to be more careful about what you buy. For > example, you can't just assume your SATA backplane has hot swap lights > (got bit by this one myself, heh). Yeah, that's my big problem with any

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

2005-01-14 Thread Merlin Moncure
Alex wrote: > Without starting too much controvesy I hope, I would seriously > recommend you evaluate the AMCC Escalade 9500S SATA controller. It > has many of the features of a SCSI controler, but works with cheaper > drives, and for half the price or many SCSI controlers (9500S-8MI goes > for ab

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

2005-01-14 Thread Greg Stark
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. That means if any drive from th

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

2005-01-14 Thread Alex Turner
Without starting too much controvesy I hope, I would seriously recommend you evaluate the AMCC Escalade 9500S SATA controller. It has many of the features of a SCSI controler, but works with cheaper drives, and for half the price or many SCSI controlers (9500S-8MI goes for abour $500). See http:/

Re: [PERFORM] Best filesystem for PostgreSQL Database Cluster under Linux

2005-01-14 Thread Alex Turner
On Wed, 12 Jan 2005 07:25:43 +1100, Pete de Zwart <[EMAIL PROTECTED]> wrote: [snip] > improvement on I/O compared to the improvement potential of moving to > SCSI/FCAL, that and getting more memory. > I would like to ask the question that continues to loom large over all DBAs. SCSI, FCAL and SAT

Re: [PERFORM] sum of all values

2005-01-14 Thread Madison Kelly
Richard Huxton wrote: Madison Kelly wrote: Hi all, Is there a fast(er) way to get the sum of all integer values for a certain condition over many thousands of rows? What I am currently doing is this (which takes ~5-10sec.): OK, I'm assuming you've configured PG to your satisfaction and this is

Re: [PERFORM] query optimization help

2005-01-14 Thread sarlav kumar
Hi,   Thanks for the help. I actually got around with it by doing the following. I created a temporary table:   create table statesnew as select distinct state,state_code from postalcode where lower(country)='us';   And then changed the query to :   SELECT (SELECT sn.state FROM statesnew sn WHERE U

Re: [PERFORM] query optimization help

2005-01-14 Thread Merlin Moncure
Please post in plaintext, not html where possible. Your group by clause was 'myst'...was that supposed to be mystate? Her is something you might try...use the original query form and create a function which resolves the state code from the input data...you are already doing that with upper. So,

[PERFORM] query optimization help

2005-01-14 Thread sarlav kumar
Hi All,   I have the following query to generate a report grouped by "states".   SELECT distinct upper(cd.state) as mystate, SUM(d.amount) as total_amount, SUM(COALESCE(d.fee,0) + COALESCE(mp.seller_fee, 0) + COALESCE(mp.buyer_fee,0)) as total_fee FROM data d left JOIN customerdata cd ON d.uid = cd

Re: [PERFORM] sum of all values

2005-01-14 Thread Richard Huxton
Madison Kelly wrote: Hi all, Is there a fast(er) way to get the sum of all integer values for a certain condition over many thousands of rows? What I am currently doing is this (which takes ~5-10sec.): OK, I'm assuming you've configured PG to your satisfaction and this is the only query giving

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

2005-01-14 Thread Benjamin Wragg
Hi, From what I've been reading on the list for the last few months, adaptec isn't that good when it comes to RAID controllers, but LSI keeps popping up. Is there any particual models that are recommended as I'm in the market for two new servers both with RAID controllers. The server specs I'm thi