[PATCH] Referenced generic plan mode

Поиск
Список
Период
Сортировка
От Vlada Pogozhelskaya
Тема [PATCH] Referenced generic plan mode
Дата
Msg-id 19919494-92a8-4905-a250-6cf17b89f7c3@gmail.com
обсуждение исходный текст
Список pgsql-hackers

Hi all,

I’d like to propose a patch that introduces a referenced generic plan mode.

The patch adds:

  • new EXPLAIN option REF_GENERIC_PLAN (not allowed with ANALYZE);

  • new plan_cache_mode values ref_auto and force_ref_generic_plan;

  • a flag to prevent constant folding of Params when building a generic plan.

Generic and custom plan behavior stays unchanged unless the new option is used.
Similar ideas exist in other systems: Oracle (Adaptive Cursor Sharing), SQL Server (Parameter Sensitive Plan Optimization), and Db2 (REOPT).

I’ve attached the patch and a minimal regression test.

Best regards,
Vlada Pogozhelskaya

Вложения

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