Re: How to observe plan_cache_mode transition from custom to generic plan?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: How to observe plan_cache_mode transition from custom to generic plan?
Дата
Msg-id CAKFQuwYvmmhDjX+StTV8oDVMcPPQ0eTJ-pJep0VSB2RZyy+oNw@mail.gmail.com
обсуждение исходный текст
Ответ на How to observe plan_cache_mode transition from custom to generic plan?  (Richard Michael <rmichael@edgeofthenet.org>)
Ответы Re: How to observe plan_cache_mode transition from custom to generic plan?  (Richard Michael <rmichael@edgeofthenet.org>)
Список pgsql-general
On Sunday, September 5, 2021, Richard Michael <rmichael@edgeofthenet.org> wrote:

Based on the documentation, I expected the first planned query text to
be: `SELECT 10 AS data`, since it should be a custom plan with
substituted values.  However, the query text always contains a parameter
symbol: `SELECT $1 AS data`.


A query plan is not the same as the query text.  While the executed plan can be generic or custom the query text is constant.

If you want to see the difference between a generic and a custom plan you need to comprise a query that would actually have different custom and generic plans.  Queries that don’t involve tables, indexes, or joins don’t have any choices to make with respect to how they are executed.

David J.

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

Предыдущее
От: Mladen Gogala
Дата:
Сообщение: Re: How to observe plan_cache_mode transition from custom to generic plan?
Следующее
От: Shubham Mittal
Дата:
Сообщение: Re: Query takes around 15 to 20 min over 20Lakh rows