Re: [SQL] Efficiency in Multiple Queries of Same Table in a PL/PgSQL Function

2009-10-16 Thread Rob Sargent
I don't see anything in the assignment statements (sigma_* :=) which would prevent one from doing all three of them within a single for loop. In fact, written as is there's some chance the values of the sigma_*s might change between repeated calls to the function since there is no explicit ord

[SQL] Efficiency in Multiple Queries of Same Table in a PL/PgSQL Function

2009-10-16 Thread Gary Chambers
All... In the poly_example function below, I am emulating an actual requirement by querying the same table three (3) times in order to derive a solution to a problem. Is this the best or most efficient and effective way to implement this? The table (which consists of only five (5) FLOAT8 columns