[PERFORM] SQL functions vs. PL/PgSQL functions

2010-10-13 Thread Reuven M. Lerner
e can offer. Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-8405 * US phone: 847-230-9795 Skype/AIM: reuvenlerner -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresq

Re: [PERFORM] SQL functions vs. PL/PgSQL functions

2010-10-13 Thread Reuven M. Lerner
Wow. Thanks so much to all of you for the thoughtful and helpful responses! Reuven -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

[PERFORM] Backup strategies

2008-10-14 Thread Reuven M. Lerner
I can turn to do a low-priority backup while the live site is running? Is there a superior backup strategy than pg_dump every 24 hours? Thanks in advance for any advice you can offer! Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-8405 * US pho

[PERFORM] Speeding up loops in pl/pgsql function

2011-05-25 Thread Reuven M. Lerner
changed when I increased it. Of course, any suggestions for how to deal with octal digits in PostgreSQL 8.3, such as an octal equivalent to the x'ff' syntax, would be more than welcome. Thanks in advance, Reuven -- Reuven M. Lerner -- Web development, consulting, and trainin

Re: [PERFORM] Speeding up loops in pl/pgsql function

2011-05-25 Thread Reuven M. Lerner
t I could (easily) build a string like that from digits in a variable or a column, but I'll poke around and see if it can work. Thanks, Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-8405 * US phone: 847-230-9795 Skype/AIM: reuvenlerner -- Se

Re: [PERFORM] Speeding up loops in pl/pgsql function

2011-05-25 Thread Reuven M. Lerner
URN array_to_string(translated_string_array, ''); END; $$ LANGUAGE 'plpgsql'; Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-8405 * US phone: 847-230-9795 Skype/AIM: reuvenlerner -- Sent via pgsql-performance mailing list (pgsql-p

Re: [PERFORM] Speeding up loops in pl/pgsql function

2011-05-26 Thread Reuven M. Lerner
Wow. Color me impressed and grateful. I've been working on a different project today, but I'll test these tonight. I'll never underestimate the regexp functionality in PostgreSQL again! Reuven -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to y

Re: [PERFORM] Speeding up loops in pl/pgsql function

2011-06-01 Thread Reuven M. Lerner
Hi, everyone. First of all, thanks for all of your help several days ago. The improvements to our program were rather dramatic (in a positive sense). Based on the help that everyone gave, I'm working on something similar, trying to use regexp_replace to transform a string into the result of

Re: [PERFORM] Speeding up loops in pl/pgsql function

2011-06-02 Thread Reuven M. Lerner
s as necessary. Thanks again, Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-8405 * US phone: 847-230-9795 Skype/AIM: reuvenlerner -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http

[PERFORM] Triggering autovacuum

2011-06-09 Thread Reuven M. Lerner
m at regular intervals (like in the bad old days), because autovacuum won't get triggered. But hey, if anyone has any pointers to offer on this topic, I'd certainly appreciate it. Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-8405 * US p

Re: [PERFORM] Triggering autovacuum

2011-06-11 Thread Reuven M. Lerner
Hi, Greg. Thanks for the quick and useful answer, even if it means that my hopes for a quick fix have been dashed. I guess I'll need to do some actual monitoring, then... Reuven -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscriptio

[PERFORM] Very long deletion time on a 200 GB database

2012-02-23 Thread Reuven M. Lerner
memory, that there isn't really a solution that will work quickly and easily. But I'd be delighted to be wrong, and welcome any and all comments and suggestions for how to deal with this. Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-84

Re: [PERFORM] Very long deletion time on a 200 GB database

2012-02-23 Thread Reuven M. Lerner
ave limited time to execute the DELETE, and that doing it in stages might not be possible. Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-8405 * US phone: 847-230-9795 Skype/AIM: reuvenlerner -- Sent via pgsql-performance mailing list (pgsql-perform

Re: [PERFORM] Very long deletion time on a 200 GB database

2012-02-23 Thread Reuven M. Lerner
Hi, everyone. So it turns out that we're not using 25 GB of virtual memory. (That's what I had been shown yesterday, and it was a bit surprising, to say the least...) A few statistics that I managed to get from the Windows developers/system administrators: - The machine has a total of 3.5

Re: [PERFORM] Very long deletion time on a 200 GB database

2012-02-24 Thread Reuven M. Lerner
eems a bit low to me, given the size of the database and the fact that we're doing so much sorting and subselecting. Am I right that we should push that up some more? Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-8405 * US phone: 847-230

Re: [PERFORM] Very long deletion time on a 200 GB database

2012-02-24 Thread Reuven M. Lerner
Hi, everyone. Shaun said: On 02/24/2012 12:39 AM, Reuven M. Lerner wrote: - CPU is virtually idle when running the deletes, using about 1% of CPU I think you found your problem. See if you can get the Windows admins to give you some info on how busy the disks are (percent utilization, IOPS

Re: [PERFORM] Very long deletion time on a 200 GB database

2012-02-25 Thread Reuven M. Lerner
) ? Unfortunately, it took 9 hours to delete all of the rows associated with the older-than-30-days records. Reuven -- Reuven M. Lerner -- Web development, consulting, and training Mobile: +972-54-496-8405 * US phone: 847-230-9795 Skype/AIM: reuvenlerner -- Sent via pgsql-performance mailing list

Re: [PERFORM] Very long deletion time on a 200 GB database

2012-02-26 Thread Reuven M. Lerner
Hi again, everyone. Wow, I can't get over how helpful everyone has been. Shaun wrote: The main problem you're going to run into is that your table is larger than the memory in that server. 4GB is really pretty small for a server hosting a 200+GB database. That they didn't mean it to get that

Re: [PERFORM] Very long deletion time on a 200 GB database

2012-02-27 Thread Reuven M. Lerner
Hi, everyone. I wanted to thank you again for your help on the huge delete problem that I was experiencing. After a lot of trial and error, we finally came to the conclusion that deleting this much data in the time frame that they need, on underpowered hardware that is shared with an applicat

Re: [PERFORM] Very long deletion time on a 200 GB database

2012-02-27 Thread Reuven M. Lerner
and will not change. Period. So for now, we'll just try to DELETE faster than we INSERT, and combined with autovacuum, I'm hoping that this crisis will be averted. That said, the current state of affairs with these machines is pretty fragile, and I think that we might want to head off