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

From: Gary Chambers <gwchamb(at)gmail(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: matthias schoeneich <matthias(dot)schoeneich(at)gmx(dot)net>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Efficiency in Multiple Queries of Same Table in a PL/PgSQL Function
Date: 2009-10-19 21:54:13
Message-ID: 302670f20910191454r4faef8f7m78b5218e6e6a5788@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> But if I read the OP correctly the sigma are in fact used additively in each
> row in blah.  "sigma_* = sigma_* +"

I apologize, but I omitted a CASE statement prior to each calculation
of the values. The coefficients for each calculation change depending
upon which case is valid. I could probably rewrite it using arrays
and may, in fact, do so to eliminate the two added queries. Thank you
for your input.

-- Gary Chambers

/* Nothing fancy and nothing Microsoft! */

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Hall 2009-10-19 22:39:35 Dynamic Query
Previous Message Tom Lane 2009-10-19 17:32:49 Re: How to order varchar data by word