Re: Performance question (FOR loop)

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: vishal saberwal
Дата:
Сообщение: Performance question (FOR loop)
Следующее
От: "Cristian Prieto"
Дата:
Сообщение: Trouble with bytea in SPI...