Re: Parallel query only when EXPLAIN ANALYZEd

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Parallel query only when EXPLAIN ANALYZEd
Дата
Msg-id CAKJS1f8Ca6=Jj83Bb7EWaSKwcS=uGVGWEAf8o7uwQSH7pX6a4w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parallel query only when EXPLAIN ANALYZEd  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 1 October 2016 at 10:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> David Rowley <david.rowley@2ndquadrant.com> writes:
>> On 1 October 2016 at 05:47, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Somebody will need to trace through this on Windows and see where it's
>>> going off the rails.
>
>> I tried the test case on 9.6.0 on a Windows 8.1 machine, and it works
>> fine for me.
>
> Hm, but if we assume that EXPLAIN ANALYZE is somehow affecting the
> behavior, it's entirely plausible that having auto_explain active
> would have the same effect.
>
> Please try it without auto_explain, and just rely on noting the runtime
> with psql's \timing to infer whether workers were active or not.

It's certainly worth trying that, but in Jay's case auto_explain made
no difference.

Results without auto_explain:

postgres=# set max_parallel_workers_per_gather=8;
SET
Time: 0.257 ms
postgres=# SELECT avg(id) from big where id % 17 = 0;
          avg
-----------------------
 15000001.000000000000
(1 row)


Time: 1027.599 ms (00:01.028)
postgres=# set max_parallel_workers_per_gather=0;
SET
Time: 0.163 ms
postgres=# SELECT avg(id) from big where id % 17 = 0;
          avg
-----------------------
 15000001.000000000000
(1 row)


Time: 3262.519 ms (00:03.263)

postgres=# select version();
                                                 version
---------------------------------------------------------------------------------------------------------
 PostgreSQL 9.6.0 on x86_64-pc-mingw64, compiled by gcc.exe (Rev5,
Built by MSYS2 project) 4.9.2, 64-bit
(1 row)


--
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgadmin vs psql output
Следующее
От: raf
Дата:
Сообщение: Re: Frequent "pg_ctl status" removing(?) semaphores (unlikely)