Re: Small performance regression in 9.2 has a big impact
В списке pgsql-performance по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Small performance regression in 9.2 has a big impact |
| Дата | |
| Msg-id | 24181.1416956542@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Small performance regression in 9.2 has a big impact (Scott Marlowe <scott.marlowe@gmail.com>) |
| Список | pgsql-performance |
Scott Marlowe <scott.marlowe@gmail.com> writes:
> On Tue, Nov 25, 2014 at 1:58 PM, Heikki Linnakangas
> <hlinnakangas@vmware.com> wrote:
>> I don't know why this regressed between those versions, but looking at the
>> functions, there's some low-hanging fruit:
>>
>> 1. tree_ancestor_keys() could use UNION ALL instead of UNION. (I believe
>> duplicates are expected here, although I'm not 100% sure).
>>
>> 2. tree_ancestor_keys() calculates tree_level($1) every time it recurses.
>> Would be cheaper to calculate once, and pass it as argument.
> Wow that made a huge difference. About a 50% increase across the
> board. Sadly, 9.2 is still way behind 8.4 (see Tom's email)
Switching from UNION to UNION ALL would dodge the varbit hash-opclass
caching issue, I think. But there's still something else going on.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера