| От | Joe Conway |
|---|---|
| Тема | Re: function returning setof performance question |
| Дата | |
| Msg-id | 3F2740A8.7020900@joeconway.com обсуждение исходный текст |
| Ответ на | Re: function returning setof performance question (Mark Bronnimann <meb@speakeasy.net>) |
| Список | pgsql-sql |
Mark Bronnimann wrote: > I was hoping to eliminate the parse call on the view because I was doing > the where clause on the view instead of putting the where in the view. > In all, I was hoping to keep a single view called from multiple functions > with different where clauses. Yep... I shoulda known better... > It sounds like you're using a sql function, not a plpgsql function (although I don't think you said either way). If you write the function in plpgsql it will get parsed and cached on the first call in a particular backend session, which *might* give you improved performance on subsequent calls, if there are any; are you using persistent connections? Alternatively, it might work to use a prepared query. Joe
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера