| От | Gregory Stark |
|---|---|
| Тема | Re: plpgsql functions and the planner |
| Дата | |
| Msg-id | 87d4obmktr.fsf@oxford.xeocode.com обсуждение |
| Ответ на | plpgsql functions and the planner ("Matthew Dennis" <mdennis@merfer.net>) |
| Список | pgsql-general |
"Matthew Dennis" <mdennis@merfer.net> writes: > Do SQL statements inside of plpgsql functions get planned upon every > execution, only when the function is first executed/defined, or something > else entirely? First executed per session. > Now, when bar is executed again, will PG (8.3.1) know that a seqscan is no > longer reasonable? It won't notice until someone runs ANALYZE on that table. autovacuum should notice that it's necessary and run but might not run promptly enough for your purposes. You might have to run analyze within your function. Before 8.3 it still wouldn't get replanned until you started a new session but 8.3 is more clever. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера