| От | Chris Travers |
|---|---|
| Тема | Planner question regarding functions |
| Дата | |
| Msg-id | 1070875419.29122.6.camel@localhost.localdomain обсуждение исходный текст |
| Ответы |
Re: Planner question regarding functions
|
| Список | pgsql-general |
Hi all;
I suspect I know what the answer here is, but I thought I would ask
anyway. How transparent are SQL language functions from the planner's
perspective? For example if I create a table:
CREATE TABLE proof_of_concept(
poc_id serial primary key,
testing text
);
and a function:
CREATE FUNCTION search_poc() RETURNS setof proof_of_concept AS '
SELECT * FROM proof_of_concept
' LANGUAGE SQL;
Then will the planner be able to use indexes if I do:
SELECT * FROM search_poc() WHERE poc_id = 16023
I am assuming it won't. But can the planner "see inside" the SQL
language functions, thus expanding them similar to a view, or will this
force a sequential scan?
Best Wishes,
Chris Travers
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера