From: Gary Chambers <gwchamb@gmail.com>
To: Rob Sargent <robjsargent@gmail.com>
Cc: matthias schoeneich <matthias.schoeneich@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Efficiency in Multiple Queries of Same Table in a PL/PgSQL Function
Date: Mon, 19 Oct 2009 17:54:13 -0400
Message-ID: <302670f20910191454r4faef8f7m78b5218e6e6a5788@mail.gmail.com> (raw)
In-Reply-To: <4ADAA720.3050706@gmail.com>
References: <302670f20910161927h688e13e7qd096e63e68b7ae6c@mail.gmail.com>
<4AD93837.7030500@gmail.com>
<hbc9qk$vc4$1@news.hub.org>
<4ADAA720.3050706@gmail.com>
> 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! */
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gwchamb@gmail.com, robjsargent@gmail.com, matthias.schoeneich@gmx.net
Subject: Re: Efficiency in Multiple Queries of Same Table in a PL/PgSQL Function
In-Reply-To: <302670f20910191454r4faef8f7m78b5218e6e6a5788@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox