When does Postgres cache query plans?

Поиск
Список
Период
Сортировка
От Mike Christensen
Тема When does Postgres cache query plans?
Дата
Msg-id CABs1bs1zchcWTRm+OibONH_fddUtT_DP8LWi_tFN0A5k9NSvHg@mail.gmail.com
обсуждение исходный текст
Ответы Re: When does Postgres cache query plans?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I'm curious under what circumstances Postgres will cache an execution
plan for a query.

Obviously if you create it with the PREPARE statement, it will be cached..

However, if I just run an ad-hoc query such as:

select * from Foo where X < 5;

A few hundred times, will that be cached?  What if I run:

select * from Foo where X < :value;

Can that be cached, or will it always be re-evaluated based on the
value of :value?  Thanks!

Mike


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

Предыдущее
От: jam3
Дата:
Сообщение: Re: Where is the char and varchar length in pg_catalog for function input variables
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: "Too far out of the mainstream"