Previous Topic

Next Topic

Book Contents

Book Index

Performance Considerations for Selection Criteria

The overall performance of each call to CTMAPI is largely dependent on the selection criteria. These must be carefully considered.

An important factor affecting overall performance is the uniqueness of the selection criteria. If very few jobs in the Active Jobs file conform to your selection criteria, then very few job records will have to be handled. For example, if you search for a specific Order ID, the result will be the reading of only a few index records and only one job record. On the other hand, if you search for all jobs with a member name starting with ABC, the API must read many job records as well as the index records.

You can greatly improve overall performance by using indexed fields in the selection criteria. This results in a faster and more efficient search. The use of non-indexed fields causes a sequential search through the Active Jobs file, which is very slow and inefficient.

Table 283 shows the attributes of each selection criteria parameter.

Table 283 Selection Criteria Parameter Attributes

Parameter

Indexed

Unique

Notes

MEM

Yes

No

 

GROUP

Yes

No

 

JOB

Yes

No

Valid only after job submission

JOBID

No

No

Valid only after job submission

OWNER

Yes

No

 

OID

Yes

Yes

 

ODATE

No

No

 

STATUS

Yes

No

EXIST and NONEXIST statuses are not indexed.

STATE

Yes

No

 

As Table 283 shows, OID is the best choice for selection criteria, since it is both indexed and unique. On the other hand, ODATE and JOBID are the worst choices for selection criteria, since they are neither indexed nor unique. If you must use one of the non-indexed search criteria, BMC recommends using it in a combination with other indexed criteria.

Another factor affecting overall performance is the complexity of any AND or OR statements that qualify the selection criteria. Statements included in an AND or OR section of the selection criteria are each handled separately, one by one, as if each is a fully qualified selection criteria, and the whole Boolean sentence is verified only after each such statement is checked.

Parent Topic

Conditional Requests and Selection Criteria