FAQ's - APPX Software, Inc. : APPX Utility : APPX Development Environment :
Query Processes | |
FAQ's relating to the design of APPX Query Processes.
| |
Subcategories:
Answers in this category: | |
[New Answer in "Query Processes"] | |
2004-Jul-09 4:50pm | |
FAQ's - APPX Software, Inc. : APPX Utility : APPX Development Environment : Query Processes :
Query stops before processing entire file! | |
When running a job/update process that uses a query, we got an Appx error during the selecting records phase. This was about 10000 records into the file, out of ~180000, and stated that it couldn't scratch the work file because the record length was invalid.
| |
That's caused by a known bug in earlier versions of Appx. You can work around that problem by setting an environment variable, try this:APPX_RUN_MEM=2097150This tells Appx to allocate 2MB to process a give query before it falls back to using an on-disk sort strategy. | |
[Append to This Answer] | |
2003-Nov-20 11:10am | |
FAQ's - APPX Software, Inc. : APPX Utility : APPX Development Environment : Query Processes :
Why doesn’t my QUERY use the file’s index? | |
A query for (FLD EQ "A") used the index on FLD to select records, a query for (FLD EQ 1) OR (FLD EQ 2) OR (FLD EQ 3) doesn't use the index, why? (Determined by looked in APPX QUERY LOG and saw what it was doing.)
The Query compiler currently (as of 4.1.9) stops looking for indexes once it runs into an OR condition.
| |
Bruce Johnston Feb 5, '04:
Starting in 4.1 you can use the new Query Event Point, Establish PCF Range, to boost performance where OR conditions are on leading portions of a key field. In the following example, a memory file, MCUST, contains customer master record keys of interest obtained using a prior scolling input...
...
* * Customer of interest were supplied in an earlier input. * BEG READ DAR MCUST HOLD 0 KEY IS MCUST CUSTOMER NO BEG AT DAR TRANSACT IN DAR MCUST CUSTOMER NO END AT DAR TRANSACT IN DAR MCUST CUSTOMER NO BEG READ DAR TRANSACT HOLD 0 KEY IS TRANSACT KEY GOSUB --- PROCESS QUERY RECORD END READ DAR TRANSACT END READ DAR MCUST... This is effectively an OR condition for each value of MCUST CUSTOMER NO. You could have additional OR conditions on other key fields by simply cloning the above sequence and then modifying it. I have verified Steve's assertion that you can't end up with the same record selected twice. Note that the presence of ANY code in this series even something as innocuous as a simple TRAP or comment line will disable the Fast Query which might otherwise occur on design/runtime criteria normally specified though additional selection criteria are honoured. The records acted upon by --- PROCESS QUERY RECORD are simply the only candidates considered for the selection criteria. | |
[Append to This Answer] | |
2004-Feb-05 6:40pm | |
FAQ's - APPX Software, Inc. : APPX Utility : APPX Development Environment : Query Processes :
Can I create a Cached copy of a file to use in my pre-user selection event point? | |
Yes, CREATE the cached file in Start of Query Execution
| |
[Append to This Answer] | |
2004-Jul-09 4:49pm | |
FAQ's - APPX Software, Inc. : APPX Utility : APPX Development Environment : Query Processes :
Is there a way to edit query and sort order screens? | |
Yes (rel 4.2 and up). Look at 0LC 00: Inputs
QSLCT EDIT
QSLCT EDIT (EXPR)
QSORT EDIT
| |
[Append to This Answer] | |
2004-Jul-09 4:50pm |
Previous: | Output Processes |
Next: | Update Processes |
|