| От | Tom Lane |
|---|---|
| Тема | Re: Performance question (FOR loop) |
| Дата | |
| Msg-id | 8664.1125619376@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Performance question (FOR loop) (vishal saberwal <vishalsaberwal@gmail.com>) |
| Список | pgsql-general |
vishal saberwal <vishalsaberwal@gmail.com> writes:
> The query I am actually trying to optimize is long and has a few joins (for=
> =20
> normalization) and hence didn't copy it here.
> The function structure is similar to the one above.
> (a) Am i right in thinking that if I eliminate the for loop, some=20
> performance gain can be achieved?
> (b) Is there a way to eliminate this for loop?
Is the plpgsql layer actually doing anything useful, or just passing
back the results of the SQL command? If the latter, use a SQL function
instead. Or perhaps even better, replace the function by a view.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера