RE: Parallel INSERT (INTO ... SELECT ...)

Поиск
Список
Период
Сортировка
От Tang, Haiying
Тема RE: Parallel INSERT (INTO ... SELECT ...)
Дата
Msg-id b907ec43ebbf4f6bb8407ecd884868fc@G08CNEXMBPEKD05.g08.fujitsu.local
обсуждение исходный текст
Ответ на Re: Parallel INSERT (INTO ... SELECT ...)  (Greg Nancarrow <gregn4422@gmail.com>)
Ответы RE: Parallel INSERT (INTO ... SELECT ...)  ("Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>)
Список pgsql-hackers
> Did it actually use a parallel plan in your testing?
> When I ran these tests with the Parallel INSERT patch applied, it did 
> not naturally choose a parallel plan for any of these cases.

Yes, these cases pick parallel plan naturally on my test environment.  

postgres=# explain verbose insert into testscan select a from x where a<80000 or (a%2=0 and a>199900000);
                                            QUERY PLAN
---------------------------------------------------------------------------------------------------
 Gather  (cost=4346.89..1281204.64 rows=81372 width=0)
   Workers Planned: 4
   ->  Insert on public.testscan  (cost=3346.89..1272067.44 rows=0 width=0)
         ->  Parallel Bitmap Heap Scan on public.x1  (cost=3346.89..1272067.44 rows=20343 width=8)
               Output: x1.a, NULL::integer
               Recheck Cond: ((x1.a < 80000) OR (x1.a > 199900000))
               Filter: ((x1.a < 80000) OR (((x1.a % 2) = 0) AND (x1.a > 199900000)))
               ->  BitmapOr  (cost=3346.89..3346.89 rows=178808 width=0)
                     ->  Bitmap Index Scan on x1_a_idx  (cost=0.00..1495.19 rows=80883 width=0)
                           Index Cond: (x1.a < 80000)
                     ->  Bitmap Index Scan on x1_a_idx  (cost=0.00..1811.01 rows=97925 width=0)
                           Index Cond: (x1.a > 199900000)

PSA is my postgresql.conf file, maybe you can have a look. Besides, I didn't do any parameters tuning in my test
session.

Regards,
Tang



Вложения

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

Предыдущее
От: Andy Fan
Дата:
Сообщение: Re: cost_sort vs cost_agg
Следующее
От: Markus Wanner
Дата:
Сообщение: repeated decoding of prepared transactions