Re: [GENERAL] Performance slowing down when doing same UPDATE many times

2015-03-09 Thread Jan Strube
developer does the same “mistake” again.   Thanks Jan     From: Jan Strube Sent: Tuesday, February 10, 2015 12:03 PM To: 'pgsql-general@postgresql.org' Subject: Performance slowing down when doing same UPDATE many times   Hi,   we recently found a bug in one of our applications which

[GENERAL] Performance slowing down when doing same UPDATE many times

2015-02-10 Thread Jan Strube
Hi,   we recently found a bug in one of our applications which was doing exactly the same UPDATE operation a few thousand times inside a transaction. This caused the UPDATEs to become slower and slower from some milliseconds to some seconds. We already fixed the application but I am wondering i

[GENERAL] Perl function leading to out of memory error

2013-02-19 Thread Jan Strube
Hi, we have a Java daemon that´s repeatedly calling a Perl function inside our database (version 9.1.8). The function is called about 200 times per second. While the Java program is running you can watch the memory usage of the postmaster grow continuously until after a few hours we get an ou

Re: [GENERAL] Query becomes slow when written as view

2013-02-15 Thread Jan Strube
is your function stable/immutable, and if so is it decorated as such. No, itŽs volatile. Well, that's your problem. The planner won't push down the IN clause past the volatile function for fear of changing the query's side-effects. I'd question whether it's sane to have a view with volatile

Re: [GENERAL] Query becomes slow when written as view

2013-02-14 Thread Jan Strube
is your function stable/immutable, and if so is it decorated as such. merlin No, it´s volatile. Jan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Query becomes slow when written as view

2013-02-14 Thread Jan Strube
Hi, I have the following query which runs reasonably fast under PostgreSQL 9.1.8: SELECT b."ISIN", CASE WHEN b."COMMENT" IS NOT NULL THEN b."COMMENT" WHEN cc."ISIN" IS NOT NULL THEN cc.comment ELSE get_comment(b."ISIN") END AS "COMMENT" FROM dtng."Z_BASE" b LEFT JOIN dtng.cached_comments cc on

Re: [GENERAL] Prevent out of memory errors by reducing work_mem?

2013-01-27 Thread Jan Strube
Hi, you are right. We were running 9.1.4 and after upgrading to 9.1.7 the error disappeared. Thanks a lot, JanStrube I'm getting an out of memory error running the following query over 6 tables (the *BASE* tables have over 1 million rows each) on Postgresql 9.1. The machine has 4GB RAM: It l

[GENERAL] Prevent out of memory errors by reducing work_mem?

2013-01-25 Thread Jan Strube
Hi, I´m getting an out of memory error running the following query over 6 tables (the *BASE* tables have over 1 million rows each) on Postgresql 9.1. The machine has 4GB RAM: SELECT * FROM dtng."Z_BASE" zb LEFT JOIN dtng."Z_BASE_COUNTRY" zbc ON zb."ISIN" = zbc."ISIN" LEFT JOIN dtng."PRODUCT_T

Re: [GENERAL] SELECT my_table.varchar FROM my_table

2010-05-31 Thread Jan Strube
Am 31.05.2010 17:44, schrieb Tom Lane: Richard Broersma writes: On Mon, May 31, 2010 at 7:48 AM, Jan Strube wrote: I accidentally encountered a feature in Postgres 8.3 that I couldn't find in the documentation while submitting a query like SELECT my_table.varchar FROM my_

[GENERAL] SELECT my_table.varchar FROM my_table

2010-05-31 Thread Jan Strube
Hello, I accidentally encountered a feature in Postgres 8.3 that I couldn't find in the documentation while submitting a query like SELECT my_table.varchar FROM my_table which returns a concatenated string of all field values per row. I wonder where this is documented (and if it has something

[GENERAL] Invoke trigger after commit

2007-05-10 Thread Jan Strube
Hi, is there a way to invoke a trigger only if the current transaction is committed? The problem is that my trigger does some kind of logging outside the database and therefore must not be invoked if the transaction is rolled back. Thanks in advance Jan ---(end of br