Postgresql PL parallel processing inside Postgresql function....

Поиск
Список
Период
Сортировка
От Misa Simic
Тема Postgresql PL parallel processing inside Postgresql function....
Дата
Msg-id CAH3i69mad1VnTzraT3_S2BbjNca3zhLMxye9K3bC7qHEwdThRQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Postgresql PL parallel processing inside Postgresql function....
Список pgsql-general
Hi,

I have a table of bunch of records:

MainTable:
-MainID
-Other attributes....


Several Tables what Track Activities about MainIDs...


And one routine written as plpgsql function what Loops trough MainTable and for each record, calls ProccessTheThing(MainID),

What again sequentially calls, several plpgsql functions bellow for one thing...


Main problem is, every single record in MainTable waits to previous record be processed to can continue processing....

Because of they are totally independent, I would like if possible to process several things in the same time if possible?

But inside Postgresql (db_link is acceptable - I could not figure out full picture... I mean, I am aware about the way to send async query to the same db, but could not figure out full flow... i.e. sent first bunch of 10 or 20, 50 - get notice when  1 of them finsihed so can send next one... etc etc)

i.e. Outside Postgresql, It would be possible to from client app, take all MainID from MainTable, loop and call async ProccessTheThing function through several threads... 

Any Suggestions?

Many Thanks,

Misa
 

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

Предыдущее
От: Mihai Popa
Дата:
Сообщение: Re: large database
Следующее
От: Alex Burkoff
Дата:
Сообщение: Re: execution plan is wrong, or the query ?