Re: Hmmm... why does CPU-intensive pl/pgsql code parallelise so badly when queries parallelise fine? Anyone else seen this?
В списке pgsql-performance по дате отправления:
| От | andres@anarazel.de (Andres Freund) |
|---|---|
| Тема | Re: Hmmm... why does CPU-intensive pl/pgsql code parallelise so badly when queries parallelise fine? Anyone else seen this? |
| Дата | |
| Msg-id | 20150708224518.GT10242@alap3.anarazel.de обсуждение исходный текст |
| Ответ на | Re: Hmmm... why does CPU-intensive pl/pgsql code parallelise so badly when queries parallelise fine? Anyone else seen this? (Craig James <cjames@emolecules.com>) |
| Ответы |
Re: Hmmm... why does CPU-intensive pl/pgsql code parallelise so badly when queries parallelise fine? Anyone else seen this?
|
| Список | pgsql-performance |
On 2015-07-08 15:38:24 -0700, Craig James wrote: > From my admittedly naive point of view, it's hard to see why any of this > matters. I have functions that do purely CPU-intensive mathematical > calculations ... you could imagine something like is_prime(N) that > determines if N is a prime number. I have eight clients that connect to > eight backends. Each client issues an SQL command like, "select > is_prime(N)" where N is a simple number. I mostly replied to Merlin's general point (additionally in the context of plpgsql). But I have a hard time seing that postgres would be the bottleneck for a is_prime() function (or something with similar characteristics) that's written in C where the average runtime is more than, say, a couple thousand cyles. I'd like to see a profile of that. Andres
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера