Re: [PERFORM] Slow concurrent processing

2013-03-12 Thread Misa Simic
:( Ah - 9.1.0 is postgres version on Ubuntu... Thanks Jeff - you saved me some time - reorganising functions to work with different tables would take time... what potentially will not give us solution :( Many thanks, Misa 2013/3/12 Jeff Janes > On Tue, Mar 12, 2013 at 7:13 AM, Misa Simic w

Re: [PERFORM] Slow concurrent processing

2013-03-12 Thread Misa Simic
Thanks Steve, Of course I thought under the limits... I haven't thought there are that kind of problems(CPU/Memory/io) because of there are no degradation during long running process - on other sides... i.e. some complex query - run when long running process is off and run it when long runing pro

Re: [PERFORM] Slow concurrent processing

2013-03-12 Thread Jeff Janes
On Tue, Mar 12, 2013 at 7:13 AM, Misa Simic wrote: > Hi, > > Researching deeply my problem with concurrent processing i have found: > > > http://postgresql.1045698.n5.nabble.com/WHY-transaction-waits-for-another-transaction-tp2142627p2142630.html > > > "The more likely suspect is a foreign key co

Re: [PERFORM] Slow concurrent processing

2013-03-12 Thread Steve Crawford
On 03/12/2013 08:06 AM, Misa Simic wrote: Thanks Steve Well, the full story is too complex - but point was - whatever blackbox does - it last 0.5 to 2secs per 1 processed record (maybe I was wrong but I thought the reason why it takes the time how much it needs to actually do the task -CPU/IO

Re: [PERFORM] Slow concurrent processing

2013-03-12 Thread Misa Simic
Thanks Steve Well, the full story is too complex - but point was - whatever blackbox does - it last 0.5 to 2secs per 1 processed record (maybe I was wrong but I thought the reason why it takes the time how much it needs to actually do the task -CPU/IO/memory whatever is not that important) - s

Re: [PERFORM] Slow concurrent processing

2013-03-12 Thread Steve Crawford
On 03/11/2013 08:55 PM, Misa Simic wrote: Hi all, We have one table with list of "records for processing"... We loop trough that table and call one long runing function: do_the_math_for_record(record_id).. but - if replace do_the_math_and_save_results with pg_sleep(1); To simulate long

Re: [PERFORM] Slow concurrent processing

2013-03-12 Thread Misa Simic
Hi, Researching deeply my problem with concurrent processing i have found: http://postgresql.1045698.n5.nabble.com/WHY-transaction-waits-for-another-transaction-tp2142627p2142630.html "The more likely suspect is a foreign key conflict. Are both transactions inserting/updating rows that could re

[PERFORM] Slow concurrent processing

2013-03-11 Thread Misa Simic
Hi all, We have one table with list of "records for processing"... We loop trough that table and call one long runing function: do_the_math_for_record(record_id) which use different tables for select related rows for input record_id, do some calculations and insert results in two tables... an