Third Party Indexing

 

Can Warehouse make use of Third Party Indexing?

If a Third Party Indexing (TPI) product has been installed and enabled, Warehouse can take advantage of it.

 

When I access a TurboIMAGE dataset specifying a READ…FOR condition and the access uses a TPI , why do I see the message ‘Using serial read’ in the standard list after the READ statement?

Warehouse understands TurboIMAGE keys and whether a READ… FOR can be optimized to use a key. If the READ can use a key, Warehouse will print “Using keyed read” as an informational message after that particular statement. If it cannot, Warehouse will print the message “Using serial read”.

Warehouse does not know what kind of TPI optimizations have been externally defined, so it cannot know whether a particular READ…FOR is going to result in the use of a TPI index. In the case you describe, Warehouse only knows that given the non-key predicate fields, the read is serial.

 

Can you help with the following DBFIND error that I get when accessing a TurboIMAGE database?

274__ Unexpected error on DBFIND from database ‘REMS.DATABASE.PROD’:
275__ “Missing semicolon terminator in keyword find” (WHERR 10039)
276__ IMAGE error -3220: Missing semicolon terminator in keyword find
277__ Error in statement 15 (WHERR 8007)
278__ SETJCW JCW, FATAL
279__ Unless a CONTINUE is in effect, the remainder of the
280__ job will be flushed. (CIWARN 1724)

The first thing to check is whether Third Party Indexing (TPI) has been enabled for the Warehouse OPEN of that database. To show whether TPI is on, enter the following:

show <TurboIMAGE database tag>

If any data items have been indexed using a third party indexing tool, Warehouse will automatically use those indexes when the indexed field is compared for equality, including wildcards and search expressions.

If the search expression is longer than the field type, the indexing tools require that the expression be terminated with a semicolon. So, in this particular case, you may want to check the product documentation from your TPI vendor.

In order to disable Warehouse’s default use of TPI, enter the following SET command:

set < TurboIMAGE database tag > tpi off

 

Why do I get an error when I try to READ…FOR using a key that I’ve defined in my TPI environment?

616> read x = db.bill-det &
617> for full-assy = work-assy
for full-assy = work-assy &
^^^^^^^^^^^^^^
Undefined database tag ‘FULL-ASSY’ (WHERR 8056)

The field FULL-ASSY, presumably composed from the first four fields of the BILL-DET dataset (see below), is a TPI index and not a TurboIMAGE key. Warehouse cannot see into the TPI namespace nor does it know the structure of a TPI-defined index, hence the compile-time error when the Warehouse compiler attempts to validate the field name FULL-ASSY.

Depending on what results you wish from your query and the capabilities of the TPI product that you are using, you should chose one or more of the relevant TurboIMAGE fields for the READ…FOR statement. Once again, you may want to check the product documentation from your TPI vendor.

SET NAME:
BILL-DET,DETAIL

ITEMS:
PARENT-PART, X12
P-REV, X6
CHILD-PART, X12
C-REV, X6
TIME-UPD, X8
TPI INDEXES:
FULL-ASSY, G36