Re: [HACKERS] WIP Patch: Precalculate stable functions,infrastructure v1

Поиск
Список
Период
Сортировка
От Marina Polyakova
Тема Re: [HACKERS] WIP Patch: Precalculate stable functions,infrastructure v1
Дата
Msg-id d47337f599ef0b2c9cd1578ef70d5aee@postgrespro.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] WIP Patch: Precalculate stable functions,infrastructure v1  (Marina Polyakova <m.polyakova@postgrespro.ru>)
Ответы Re: WIP Patch: Precalculate stable functions, infrastructure v1
Список pgsql-hackers
Hello, hackers!

Here there's a seventh version of the patch for the precalculation of 
stable or immutable functions, stable or immutable operators and other 
nonvolatile expressions. It is rebased on the top of master and has some 
code cleanup [1]. See attached patch.

About TPC-H tests using dbt3 (see the attached small archieve):
* they were made based on commit 
255f14183ac7bc6a83a5bb00d67d5ac7e8b645f1;
* they take some time so I have used only scales 1 and 4;
* 3 attempts are used to eliminate some noise; so you can see the 
minimum, median and maximum execution time for each query on the graphs.
About their results:
* as expected, cached expressions were not used in queries;
* it seems that there is no obvious degradation of performance.

Any suggestions are welcome!

[1] Fixed:

>> Also I see this pattern quite some time, maybe it makes sense to move
>> it to a function?
>> 
>> ```
>> + /* create and return CachedExpr */
>> + CachedExpr *new_node = makeNode(CachedExpr);
>> + new_node->subexpr = (CacheableExpr *) current_node;
>> +
>> + context->root->hasCachedExpr = true;
>> +
>> + return (Node *) new_node;
>> ```
> 
> Thanks, I agree with you and I'll change it accordingly.

-- 
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: WIP: a way forward on bootstrap data
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: Implementing SQL ASSERTION