Re: [PERFORM] Help: massive parallel update to the same table

2011-03-22 Thread Red Maple
Hi, I have found the bug in my code that made the update to the same row in the table instead of two different row. Now I have all cores up and running 100%. Thank you for all your help. On Fri, Mar 18, 2011 at 3:21 PM, Kevin Grittner wrote: > Red Maple wrote: > > > Here is my function. If I

Re: [PERFORM] Help: massive parallel update to the same table

2011-03-18 Thread Kevin Grittner
Red Maple wrote: > Here is my function. If I comment out the update then it would run > all the cores, if not then only one core will run > CREATE OR REPLACE FUNCTION > [...] > select sysuptime > into this_sysuptime > from ap_sysuptime > where ap_id = this_

Re: [PERFORM] Help: massive parallel update to the same table

2011-03-18 Thread Red Maple
Hi, Here is my function. If I comment out the update then it would run all the cores, if not then only one core will run CREATE OR REPLACE FUNCTION my_update_device(this_mac text, number_of_devices integer, this_sysuptime integer) RETURNS integer AS $BODY$ DECLARE fake_mac m

Re: [PERFORM] Help: massive parallel update to the same table

2011-03-18 Thread Kevin Grittner
[rearranged - please don't top-post] [also, bringing this back to the list - please keep the list copied] Red Maple wrote: > Kevin Grittner wrote: >> It should be parallel by default. Are you taking out any >> explicit locks? > my clients use psql to remotely run an update function on the

Re: [PERFORM] Help: massive parallel update to the same table

2011-03-18 Thread Nicholson, Brad (Toronto, ON, CA)
>From: pgsql-performance-ow...@postgresql.org >[mailto:pgsql-performance-ow...@postgresql.org] On Behalf Of Red Maple >Sent: Friday, March 18, 2011 9:05 AM >To: pgsql-performance@postgresql.org >Subject: [PERFORM] Help: massive parallel update to the same table > >Hi all

Re: [PERFORM] Help: massive parallel update to the same table

2011-03-18 Thread Kevin Grittner
Red Maple wrote: > Our system has a postgres database that has a table for statistic > which is updated every hour by about 10K clients. Each client only > make update to its own row in the table. So far I am only seeing > one core out of eight cores on my server being active which tells > me th

[PERFORM] Help: massive parallel update to the same table

2011-03-18 Thread Red Maple
Hi all, Our system has a postgres database that has a table for statistic which is updated every hour by about 10K clients. Each client only make update to its own row in the table. So far I am only seeing one core out of eight cores on my server being active which tells me that the update is bein