What will speed up your query is to remove the parenthesis around the variable.
 Both of these syntaxes prevent using the index on ZID from being used.

WHERE ZID = (.vZID)
WHERE (ZID) = .vZID

This should be faster
WHERE ZID = .vZID

Dennis McGrath

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Emmitt Dove
Sent: Sunday, May 16, 2010 3:50 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Expressions, Spaces, and Performance

Tom,

Short answer:  no, parsing the two formattings of your SELECT should make no
practical difference to how fast R:BASE runs.

Emmitt Dove
Manager, Converting Applications Development
Evergreen Packaging, Inc.
[email protected]
(203) 214-5683 m
(203) 643-8022 o
(203) 643-8086 f
[email protected]


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Tom
Frederick
Sent: Sunday, May 16, 2010 14:39
To: RBASE-L Mailing List
Subject: [RBASE-L] - Expressions, Spaces, and Performance

This seems like a pretty elementary question but does the structure of 
how an expression is set up have any significant effect on performance? 
When writing expressions, I tend to write out all words and align/box 
items in a consistent format that makes it easy for others to read as in 
the first example below. That includes me 6 months later. We are doing 
more wireless connections and some concern has popped up that the extra 
spaces/letters would effect performance speed as simply more info to 
process. As time has gone by my EEPs have gone from simple 20 liners to 
over some with well over 300 lines as we put more controls in. Have not 
seen any difference on the LAN, but the wireless field laptops are not 
the fastest machines. Using latest V8 and doing a complete jump to v9 in 
the next week.

SELECT                                                  +
    Item1, Item2, ThirdThing, NumberFour  +
    INTO                                                    +
    aItem1             INDICATOR a1,           +
    aItem2             INDICATOR a2,           +
    aThirdThing     INDICATOR a3,           +
    aNumberFour  INDICATOR a4
    FROM Z_MHA_Summary WHERE ZID = (.vZID)

Compared to

SEL Item1, Item2, ThirdThing, NumberFour  INTO +
    aItem1 IND a1,  +
    aItem2 IND a2,  +
    aThirdThing IND a3, +
    aNumberFour  IND a4
    FROM Z_MHA_Summary WHERE ZID = (.vZID)

Tom Frederick
Jacksonville, IL


Reply via email to