Learn More
Search site for:
News »
Scroll Up for Recent News
Appx 5.0 Released!
The long awaited Release 5 of Appx is available ...

[Read Full Article]


Appx 5.0 Beta for Windows is Ready!
The Windows version of Appx Release 5.0 Beta is ready...

[Read Full Article]


Appx 5.0 Linux Beta is Ready!
Appx Release 5.0 Beta is ready. This Release includes ...

[Read Full Article]


Caylx Retires from Distribution
Following 33 years of working with the SPEED I, SPEED II and APPX...

[Read Full Article]


Appx Blog
Appx Blog Online
ASI has started a blog! This is an excellent way...

[Read Full Article]


Appx Conference 2007
We're pleased to report that our first European APPX Conference proved to be...

[Read Full Article]


Appx Conference 2007
Still haven't decided if the Appx Conference is for you? First of all, it's a great way...

[Read Full Article]


CWI Hosts European Conference
For some years now, ASI has been hosting tremendously successful APPX conferences in the USA...

[Read Full Article]


4.2.a Patch
ASI announces the APPX 4.2.a Patch Release is now available for download ...

[Read Full Article]


New Registration Format
ASI provides a new format for emailed APPX registrations. Registrations are now being sent as text file attachments to...

[Read Full Article]


Conference Results
Another conference is over, and once again it provided an excellent opportunity to network, learn and socialize with VARs and customers from around the world...

[Read Full Article]


Appx Conference
You are cordially invited to join your APPX colleagues and friends at the newest "episode" of the bi-annual conference, called "APPX EX-ZOO-BERATION 2006"!...

[Read Full Article]


Minicom Joins CWI
CWI is delighted to welcome Minicom Software House Ltda, located in Brazil, to its reseller network!

For over 25 years, Minicom's team of consultants has been involved in the development and...

[Read Full Article]


Sadden Joins CWI
Sadeen Computerized Systems is an integrated solutions provider which has been offering management control software, security systems and access control software to SMEs for a number of years. Now, however...

[Read Full Article]


SWS Joins CWI
CWI is pleased to welcome SWS Software Service in Austria to its reseller network! SWS has been a very successful SPEED II reseller since 1983 and has been working with APPX since...

[Read Full Article]


Sintec Joins CWI
CWI is pleased to welcome Sintec, S.A. de C.V. from Mexico to its reseller network!

[Read Full Article]


Scroll Down for Archived News


A | B | C | D | E |F | G | H | I | J | K | L | M | N | O | P
Q | R | S | T | U | V | W | X | Y | Z


Boosting Query Speed

If you have a Query that reads secondary files for additional sorting or selecting criteria, there are a couple of techniques that can make the query run faster. The first one is simple to implement, and only requires a few lines of code. The technique is to check to see if you already have the record before you go through the overhead of reading it. For example, assume we are using ORDER2 (Order Line Items) as the PCF to the Query, and we also need fields from the parent record (ORDER1). The common approach is to simply read the ORDER1 record in the Pre-User Selection Event Point, but rather than unconditionally reading the ORDER1 record, check to see if we already have the right record:

     IF   XXX ORDER1 ORDER NO    NE   XXX ORDER2 ORDER NO
T    SET  XXX ORDER1 ORDER NO    =    XXX ORDER2 ORDER NO
T    READ XXX ORDER1        KEY IS ORDER1 ORDER NO
Since we are likely to get several ORDER2 records in a row for the same Order number, this will speed up the Query by reducing the number of read into ORDER1.

A more advanced approach would be to eliminate the reads to ORDER1 completely, if the user is not sorting or selecting on fields from ORDER1. How can you tell if this is the case? Check out this tip from Bruce Johnston @ Safety Kleen.


Boosting Query Speed II

Release 4.1 introduced improved query execution by automatically using an index if a record selection used a field that was a key or alternate key. However, it does not limit query records read when the right hand side of the record selection is a field as opposed to a value. This makes sense, APPX would not know if the value of the field on the right hand side would change during the execution. If you know that the RHS won't change during execution, then you can manually put the code to read the records in the 'Establish PCF Range' Event Point of the Query. For example, the following code would read YTDPOST, but only for the current fiscal year:

    *        Assume TGL PARAM has already been read
BEG AT   TGL YTDPOST  IN TGL PARAM FISCAL YEAR
END AT   TGL YTDPOST  IN TGL PARAM FISCAL YEAR
BEG READ TGL YTDPOST                HOLD 0 KEY IS  YTDPOST FISCAL YEAR
GOSUB    --- PROCESS QUERY RECORD
END READ TGL YTDPOST
Remember that putting your own code in this even point will override anything APPX might do, so be sure your code is the best way to do it.





For additional information, contact tips@cwi-appx.com

[back to top]