Using [NOT] RECORD filename EXISTS

Ohmes, Matt Matt.Ohmes@COGNOS.com
Mon, 17 Jul 2000 17:42:42 -0400


Blue said >>>
Can anyone tell me which is more efficient and results in better
performance, if at all, of the following syntax options please?


DEFINE d_xyz CHAR*1 = "Y" IF RECORD abc EXISTS ELSE "N"

Vs.

DEFINE d_xyz CHAR*1 = "N" IF NOT RECORD abc EXISTS ELSE "Y"
<<<<
Hi Blue,

Technically, it shouldn't make any difference, but it could. (Ain't that the
way it always goes?)

The evaluation of the logic will be just as effecient either way, but I'm
guessing the "missing" record is less common than the "existing" record.  If
that is true, then the first test should be marginally faster because as
soon as the Define sees a "true" condition, evaluation stops.  (But I doubt
if you could tell the difference when it actually runs.)

Hope that helps,
Matt (trying to keep a finger in the PowerHouse pie from time to time) ;-)
Matt

Matt.Ohmes@Cognos.Com
Cognos Corporation
909 E. Las Colinas Blvd.
Suite 1900
Irving, TX  75039
214-259-6200
"Matt doesn't really know anything.  He just likes to pontificate a lot.
We refuse to acknowledge that he works for Cognos or that we have ever
met him or anyone with whom he's ever been associated.  Don't lend him
money and don't let him talk to your sister!" ;-)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.