Table selection may not be optimized when a high-order partial primary key is supplied resulting in a table sweep.

Table selection may not be optimized when a high-order partial primary key is supplied resulting in a table sweep.

book

Article ID: KB0094382

calendar_today

Updated On:

Products Versions
TIBCO Object Service Broker for z/OS -
Not Applicable -

Description

Resolution:
When a table T is defined with a primary concatenated key structure such as P1, P2, P3 and P4:

Table: T
Field  Name  Typ Syn Len Dec Key Ord Rqd
----------- --- --- –-- ---  –   -   -
P1           S   C   20   0  P
P2           Q   B    2   0  P
P3           D   B    4   0  Q
P4           Q   B    2   0  P
. . .
F5           S   C    4   0
F6           S   C    3   0
. . .

a selection such as:

1) FORALL T WHERE P1= 'TIB69668N0036331T1' | P1 = 'TIB69668N003633138' & F6='XYZ' & F5 = 'SHIP'
    or
2) FORALL T WHERE P1= 'TIB69668N0036331T1' & F6='XYZ' & F5 = 'SHIP' | P1 = 'TIB69668N003633138' & F6='XYZ' & F5 = 'SHIP'

on z/OS results in a table sweep being performed. This is because neither an internal Object Service Broker (OSB) M1 or M3 structure is generated causing a sweep. The selection criteria is applied to the result set of the sweep.

Since the partial key supplied is the high-order portion of the table's primary key, the access should be optimized to take advantage of the index. Performance on very large tables is compromised.

Environment:
============
* z/OS
* TIBCO® Object Service Broker for z/OS -accessing TDS tables with selection


Symptoms:
=========
The correct result will be obtained but the elapsed time and processing resources consumed by the query may be significant, depending on the size of the table being accessed. You may use the TSO "ADMIN" (S6BTLADM) utility, option "Iuserid" to monitor the processing being performed if the table is large. (This allows sufficient time to view the ongoing sweep. If the table contains a small number of rows, the sweep may not be noticable.)

Cause:
======
A deficiency in the rule parsing/selection generation code creates an unoptimized query format.

Resolution:
===========
Customers experiencing this situation should open a service request with TIBCO Support and request the resolution for problem OSBZ-1379.

Note:
=====
Customers are advised to review the precedence of logical operators and to enclose complex expressions within parentheses to avoid any doubt of how the expression will be avaluated. The Rules Editor will remove redundant parentheses when the rule is saved. This information is contained in the TIBCO® Object Service Broker Programming in Rules manual.

References:
===========
TIBCO® Object Service Broker for z/OS: Installing and Operating
TIBCO® Object Service Broker Programming in Rules, sections "Logical Operators" and "WHERE Clause"
TIBCO® Object Service Broker Managing Data
Problem report OSBZ-1379

Issue/Introduction

Table selection may not be optimized when a high-order partial primary key is supplied resulting in a table sweep.