Re: [GENERAL] Conditional commit inside functions

2008-12-26 Thread Pavel Stehule
2008/12/26 Gerhard Wiesinger : > Hello, > > Aren't there any drawbacks in postgrs on such large transaction (like in > Oracle), e.g if I would use 500.000.000 or even more? for insert no Regards Pavel > > Ciao, > Gerhard > > -- > http://www.wiesinger.com/ > > > On Fri, 26 Dec 2008, Pavel Stehule

Re: [GENERAL] Conditional commit inside functions

2008-12-26 Thread Gerhard Wiesinger
Hello, Aren't there any drawbacks in postgrs on such large transaction (like in Oracle), e.g if I would use 500.000.000 or even more? Ciao, Gerhard -- http://www.wiesinger.com/ On Fri, 26 Dec 2008, Pavel Stehule wrote: Hello why do you need commit? pavel 2008/12/26 Gerhard Wiesinger :

Re: [GENERAL] Conditional commit inside functions

2008-12-26 Thread Pavel Stehule
Hello why do you need commit? pavel 2008/12/26 Gerhard Wiesinger : > Hello! > > I tried the following, but still one transaction: > > SELECT insert_1Mio(); > > (parallel select count(id) from employee; is done) > > CREATE OR REPLACE FUNCTION insert_some(start_i INTEGER, end_i INTEGER) > RETURNS

Re: [GENERAL] Conditional commit inside functions

2008-12-26 Thread Gerhard Wiesinger
Hello! I tried the following, but still one transaction: SELECT insert_1Mio(); (parallel select count(id) from employee; is done) CREATE OR REPLACE FUNCTION insert_some(start_i INTEGER, end_i INTEGER) RETURNS void AS $func$ DECLARE BEGIN FOR i IN start_i..end_i LOOP INSERT INTO employe

Re: [GENERAL] Conditional commit inside functions

2008-12-25 Thread Asko Oja
On Thu, Dec 25, 2008 at 2:58 PM, Pavel Stehule wrote: > Hello, > > PostgreSQL has doesn't use rollback segment, so commit over 1 > lines is not necessary, and it is bad. If you are having database in your laptop it might be true. In OLTP environments it's not feasible to have large transacti

Re: [GENERAL] Conditional commit inside functions

2008-12-25 Thread Pavel Stehule
Hello, PostgreSQL has doesn't use rollback segment, so commit over 1 lines is not necessary, and it is bad. Regards Pavel Stehule 2008/12/25 Gerhard Wiesinger : > Hello! > > I want to translate the following Oracle PL/SQL script into plpgsql. > Especially I'm having problems with the transac