Just an FYI
I did a comparison of "compute" vs "select" in Version X (works the same as
9.5).
See the print-screen below. I tested with a where clause that will fail, I
tested both a SUM and a COUNT:
With zero ON (my default)
SUM
"compute" returns a null
"select" returns a 0
COUNT
both return a 0
No errors are returned
With zero OFF
SUM
both return a null
COUNT
both return a 0
A "warning" is returned only for the Select Sum
So in my old code, I can replace my "compute" with "select" when I'm doing a
"COUNT" because it always returns a 0
However, I cannot easily replace my "compute SUM" with a "select" because the
program tests for a result being null, and it instead would evaluate as 0. I
would have to either (a) change my checking to look at 0 rather than null or
(b) change my zero to OFF, which I'm reluctant to do for the entire routine
because that would change everything, so I'd have to set it off and back on
around every single compute statement, and there's alot of them.
Speed: Couldn't get a good comparison. Everything I tried took either 1 or 2
seconds and they switched back and forth, so I'm guessing it was "rounding".
Seems like they're about equal in speed.
BTW: these are two of the lookup-type of variable gathering commands that are
in my monster cursor program. The first table AgtComm has 4 million rows, with
RecDate indexed. However, it usually (not always) looks at just one month's
worth of data, which is usually around 55,000 rows. So I can pull that 55,000
rows into a temp table to see if it speeds up.
Karen
--
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.