Re: [SQL] Parallel updates on multiple cores

2008-06-09 Thread Simon Riggs
On Mon, 2008-06-09 at 01:29 -0700, Andrei wrote: > The function above updates the rows between the ids start_id and > end_id. > I have a quad core procesor so i run two separate connections to the > database: select populate_test_data(5000,1) and another select > populate_test_data(5000,2). In thi

Re: [SQL] Parallel updates on multiple cores

2008-06-09 Thread Shane Ambler
Andrei wrote: The function above updates the rows between the ids start_id and end_id. I have a quad core procesor so i run two separate connections to the database: select populate_test_data(5000,1) and another select populate_test_data(5000,2). In this case each function runs on one core doing

[SQL] Parallel updates on multiple cores

2008-06-09 Thread Andrei
I have the following case: a simple table drop table test_data; create table test_data ( id bigserial not null primary key, content varchar(50), processed varchar(1) ); My function doing the inserts CREATE OR REPLACE FUNCTION populate_test_data(IN nr_records BIGINT, IN proc_nr BIGINT) RETURNS i