Search Postgresql Archives

Re: Performance question (FOR loop)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



vishal saberwal <vishalsaberwal@xxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux