Re: how to get top plan of GatherMerge in OSS10

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: how to get top plan of GatherMerge in OSS10
Дата
Msg-id CAApHDvqK4=piMm4Gc9OGGxqq1MM9DVTPyEXPy4=OsJfDbD1rnQ@mail.gmail.com
обсуждение исходный текст
Ответ на how to get top plan of GatherMerge in OSS10  ("Yang, Rong" <yangr.fnst@cn.fujitsu.com>)
Список pgsql-general
On Fri, 4 Sep 2020 at 20:21, Yang, Rong <yangr.fnst@cn.fujitsu.com> wrote:
> in OSS 10, how  to make the top plan of the plan tree to GatherMerge with ‘except all’ in sql?

(I guess you're talking about PostgreSQL 10. I'm not sure what OSS 10 is.)

The ability for Gather Merge to work with Init Plan values was only
added in [1], which was new to PostgreSQL 11. So you're not going to
make that work in PostgreSQL 10.

You could try crafting the query in such a way that an Init plan is
not used. e.g a CROSS JOIN, but not sure if that'll improve your
performance any. So you could try reducing the parallel_tuple_cost a
bit, which might give you a Gather, so at least the Seq Scan will be
done in parallel. The sort will still be serial though.

A btree index on table1 (c) looks like it might be worth considering.

David

[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=e89a71fb44



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

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Aw: Implement a new data type
Следующее
От: Klaudie Willis
Дата:
Сообщение: Bitmap scan seem like such a strange choice when "limit 1"