Re: [PERFORM] [GENERAL] Strange performance degradation

2009-11-24 Thread Matthew Wakeling
On Mon, 23 Nov 2009, Lorenzo Allegrucci wrote: Anyway, how can I get rid those idle in transaction processes? Can I just kill -15 them or is there a less drastic way to do it? Are you crazy? Sure, if you want to destroy all of the changes made to the database in that transaction and

[PERFORM] Dynamic sql example

2009-11-24 Thread ramasubramanian
Dear All. Can any one give me dynamic sql in postgres stored procedure using USING CLAUSE Regards, Ram

Re: [PERFORM] Dynamic sql example

2009-11-24 Thread Pavel Stehule
2009/11/24 ramasubramanian ramasubramania...@renaissance-it.com: Dear All.     Can any one give me dynamic sql in postgres stored procedure using USING CLAUSE CREATE TABLE tab(a integer); CREATE OR REPLACE FUNCTION foo(_a integer) RETURNS void AS $$ DECLARE r record; BEGIN FOR r IN EXECUTE

[PERFORM] DELETE performance problem

2009-11-24 Thread Luca Tettamanti
Hello, I've run in a severe performance problem with the following statement: DELETE FROM t1 WHERE t1.annotation_id IN ( SELECT t2.annotation_id FROM t2) t1 contains about 48M record (table size is 5.8GB), while t2 contains about 60M record (total size 8.6GB). annotation_id is the PK in

Re: [PERFORM] DELETE performance problem

2009-11-24 Thread Luca Tettamanti
On Tue, Nov 24, 2009 at 3:59 PM, Jerry Champlin jchamp...@absolute-performance.com wrote: You may want to consider using partitioning.  That way you can drop the appropriate partition and never have the overhead of a delete. Hum, I don't think it's doable in my case; the partitioning is not

Re: [PERFORM] DELETE performance problem

2009-11-24 Thread Thom Brown
2009/11/24 Luca Tettamanti kronos...@gmail.com On Tue, Nov 24, 2009 at 3:59 PM, Jerry Champlin jchamp...@absolute-performance.com wrote: You may want to consider using partitioning. That way you can drop the appropriate partition and never have the overhead of a delete. Hum, I don't

Re: [PERFORM] DELETE performance problem

2009-11-24 Thread Jerry Champlin
You may want to consider using partitioning. That way you can drop the appropriate partition and never have the overhead of a delete. Jerry Champlin|Absolute Performance Inc.|Mobile: 303-588-2547 -Original Message- From: pgsql-performance-ow...@postgresql.org

Re: [PERFORM] [GENERAL] Strange performance degradation

2009-11-24 Thread Lorenzo Allegrucci
Matthew Wakeling wrote: On Mon, 23 Nov 2009, Lorenzo Allegrucci wrote: Anyway, how can I get rid those idle in transaction processes? Can I just kill -15 them or is there a less drastic way to do it? Are you crazy? Sure, if you want to destroy all of the changes made to the database in that

Re: [PERFORM] DELETE performance problem

2009-11-24 Thread Grzegorz Jaśkiewicz
On Tue, Nov 24, 2009 at 3:19 PM, Thom Brown thombr...@gmail.com wrote: 2009/11/24 Luca Tettamanti kronos...@gmail.com On Tue, Nov 24, 2009 at 3:59 PM, Jerry Champlin jchamp...@absolute-performance.com wrote: You may want to consider using partitioning. That way you can drop the

Re: [PERFORM] Strange performance degradation

2009-11-24 Thread Matthew Wakeling
On Tue, 24 Nov 2009, Denis Lussier wrote: IMHO the client application is already confused and it's in Prod. Shouldn't he perhaps terminate/abort the IDLE connections in Prod and work on correcting the problem so it doesn't occur in Dev/Test?? The problem is, the connection isn't just IDLE - it

Re: [PERFORM] DELETE performance problem

2009-11-24 Thread Alan Hodgson
On Tuesday 24 November 2009, Thom Brown thombr...@gmail.com wrote: It's a shame there isn't a LIMIT option on DELETE so this can be done in small batches. delete from table where pk in (select pk from table where delete_condition limit X); -- No animals were harmed in the recording of this

[PERFORM] RAID card recommendation

2009-11-24 Thread Matthew Wakeling
We're about to purchase a new server to store some of our old databases, and I was wondering if someone could advise me on a RAID card. We want to make a 6-drive SATA RAID array out of 2TB drives, and it will be RAID 5 or 6 because there will be zero write traffic. The priority is stuffing as

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Richard Neill
Matthew Wakeling wrote: We're about to purchase a new server to store some of our old databases, and I was wondering if someone could advise me on a RAID card. We want to make a 6-drive SATA RAID array out of 2TB drives, and it will be RAID 5 or 6 because there will be zero write traffic.

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Ben Chobot
On Nov 24, 2009, at 9:23 AM, Matthew Wakeling wrote: We're about to purchase a new server to store some of our old databases, and I was wondering if someone could advise me on a RAID card. We want to make a 6-drive SATA RAID array out of 2TB drives, and it will be RAID 5 or 6 because there

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Gurgel, Flavio
- Richard Neill rn...@cam.ac.uk escreveu: Matthew Wakeling wrote: We're about to purchase a new server to store some of our old databases, and I was wondering if someone could advise me on a RAID card. We want to make a 6-drive SATA RAID array out of 2TB drives, and it will be

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Scott Marlowe
On Tue, Nov 24, 2009 at 10:23 AM, Matthew Wakeling matt...@flymine.org wrote: We're about to purchase a new server to store some of our old databases, and I was wondering if someone could advise me on a RAID card. We want to make a 6-drive SATA RAID array out of 2TB drives, and it will be RAID

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Jochen Erwied
Since I'm currently looking at upgrading my own database server, maybe some of the experts can give a comment on one of the following controllers: - Promise Technology Supertrak ES4650 + additional BBU - Adaptec RAID 5405 SGL/256 SATA/SAS + additional BBU - Adaptec RAID 5405Z SGL/512 SATA/SAS

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Scott Marlowe
On Tue, Nov 24, 2009 at 12:28 PM, Jochen Erwied joc...@pgsql-performance.erwied.eu wrote: Since I'm currently looking at upgrading my own database server, maybe some of the experts can give a comment on one of the following controllers: - Promise Technology Supertrak ES4650 + additional BBU

Re: [PERFORM] [GENERAL] Strange performance degradation

2009-11-24 Thread Ing. Marcos Ortiz Valmaseda
Lorenzo Allegrucci escribió: Matthew Wakeling wrote: On Mon, 23 Nov 2009, Lorenzo Allegrucci wrote: Anyway, how can I get rid those idle in transaction processes? Can I just kill -15 them or is there a less drastic way to do it? Are you crazy? Sure, if you want to destroy all of the changes

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Ing. Marcos Ortiz Valmaseda
Gurgel, Flavio escribió: - Richard Neill rn...@cam.ac.uk escreveu: Matthew Wakeling wrote: We're about to purchase a new server to store some of our old databases, and I was wondering if someone could advise me on a RAID card. We want to make a 6-drive

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Scott Marlowe
On Tue, Nov 24, 2009 at 1:37 PM, Ing. Marcos Ortiz Valmaseda mlor...@uci.cu wrote: Do you expose that performance issued caused by RAID 5? Because this is one of our solutions here on my country to save the data of our PostgreSQL database. Which model do you recommend ? RAID 0,RAID 1, RAID 5 or

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Jochen Erwied
Tuesday, November 24, 2009, 9:05:28 PM you wrote: Have you searched the -performance archives for references to them? I'm not that familiar with Adaptec RAID controllers. Not requiring a battery check / replacement is nice. Either I searched for the wrong terms, or there isn't really that

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Gurgel, Flavio
- Scott Marlowe scott.marl...@gmail.com escreveu: On Tue, Nov 24, 2009 at 1:37 PM, Ing. Marcos Ortiz Valmaseda mlor...@uci.cu wrote: Do you expose that performance issued caused by RAID 5? Because this is one of our solutions here on my country to save the data of our PostgreSQL

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Scott Marlowe
On Tue, Nov 24, 2009 at 1:59 PM, Jochen Erwied joc...@pgsql-performance.erwied.eu wrote: Tuesday, November 24, 2009, 9:05:28 PM you wrote: Have you searched the -performance archives for references to them? I'm not that familiar with Adaptec RAID controllers.  Not requiring a battery check /

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Dave Crooke
The problem with RAID-5 or RAID-6 is not the normal speed operation, it's the degraded performance when there is a drive failure. This includes read-only scenarios. A DB server getting any kind of real use will effectively appear to be down to client apps if it loses a drive from that RAID set.

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Jochen Erwied
Tuesday, November 24, 2009, 10:34:00 PM you wrote: Aberdeen is the builder I use. They'll put any card in you want (within reason) including our preference here, Areca. Perhaps you meant Areca? I knew Areca only for their internal arrays (which one of our customers uses for his 19 systems),

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Robert Schnabel
Jochen Erwied wrote: Tuesday, November 24, 2009, 10:34:00 PM you wrote: Aberdeen is the builder I use. They'll put any card in you want (within reason) including our preference here, Areca. Perhaps you meant Areca? I knew Areca only for their internal arrays (which

Re: [PERFORM] DELETE performance problem

2009-11-24 Thread Kris Kewley
Even though the column in question is not unique on t2 could you not index it? That should improve the performance of the inline query. Are dates applicable in any way? In some cases adding a date field, partitioning or indexing on that and adding where datex days. That can be an

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Greg Smith
Matthew Wakeling wrote: People have mentioned Areca as making good RAID controllers. We're looking at the Areca ARC-1220 PCI-Express x8 SATA II as a possibility. Does anyone have an opinion on whether it is a turkey or a star? Performance should be OK but not great compared with some of the

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Greg Smith
Scott Marlowe wrote: As far as drives go we've been really happy with WD of late, they make large enterprise class SATA drives that don't pull a lot of power (green series) and fast SATA drives that pull a bit more but are faster (black series). Be careful to note the caveat that you need their

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Greg Smith
Jochen Erwied wrote: - Promise Technology Supertrak ES4650 + additional BBU - Adaptec RAID 5405 SGL/256 SATA/SAS + additional BBU - Adaptec RAID 5405Z SGL/512 SATA/SAS I've never seen a Promise controller that had a Linux driver you would want to rely on under any circumstances. Adaptec

Re: [PERFORM] RAID card recommendation

2009-11-24 Thread Scott Marlowe
On Tue, Nov 24, 2009 at 7:35 PM, Greg Smith g...@2ndquadrant.com wrote: Scott Marlowe wrote: As far as drives go we've been really happy with WD of late, they make large enterprise class SATA drives that don't pull a lot of power (green series) and fast SATA drives that pull a bit more but