Re: Parallel updates on multiple cores

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Parallel updates on multiple cores
Дата
Msg-id 1213021508.12046.104.camel@ebony.site
обсуждение исходный текст
Ответ на Parallel updates on multiple cores  (Andrei <andrei_view@yahoo.com>)
Список pgsql-sql
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 this case each function runs on one
> core doing the inserts in parallel, but when i try to run select
> select_unprocessed(1,5001) and from another connection select
> select_unprocessed(5001, 10001), one of the processes locks the table
> so the other one has to wait until the table is unlocked.
> Each process updates different parts of the table.

Your ranges overlap. So one waits for the other on tuple=5001.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



В списке pgsql-sql по дате отправления:

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: Parallel updates on multiple cores
Следующее
От: Michael Eshom
Дата:
Сообщение: Unable to create function which takes no arguments