Re: [PATCH] Generic type subscription

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: [PATCH] Generic type subscription
Дата
Msg-id CA+q6zcW0uHyc89qDF=WaQXVraqw4Q3shoLvOBR+HjQbMw6=fzg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Generic type subscription  (Artur Zakirov <a.zakirov@postgrespro.ru>)
Список pgsql-hackers
Hi

Sorry for late reply and thank you for the feedback (especially about the
problem with performance).

> There is another occurrences of "subscription" including file names

Fixed.

> we have performance degradation of SELECT queries

Yes, I figured it out. The main problem was about type info lookups, some of
them were made for each data extraction operation, which is unnecessary.
Here are results on my machine:

with the fixed version of patch

=# explain analyze select a[1], b[1][1][1] from test;
                                                 QUERY PLAN                                                 
------------------------------------------------------------------------------------------------------------
 Seq Scan on test  (cost=0.00..5286.00 rows=100000 width=6) (actual time=0.950..48.370 rows=100000 loops=1)
 Planning time: 0.054 ms
 Execution time: 51.859 ms
(3 rows)

and without the patch

=# explain analyze select a[1], b[1][1][1] from test;                                                                                 
                                                 QUERY PLAN                                                 
------------------------------------------------------------------------------------------------------------
 Seq Scan on test  (cost=0.00..5286.00 rows=100000 width=6) (actual time=3.443..43.452 rows=100000 loops=1)
 Planning time: 0.117 ms
 Execution time: 46.875 ms
(3 rows)

It's still slightly slower because of all new logic aroung subscripting
operation, but not that much.
Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Do we need use more meaningful variables to replace 0 in catalog head files?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Tackling JsonPath support