Using the call

Consider this information when creating a CSV Data Request.

Note: These actions may not make a significant difference to an individual query, but during heavy system use, all users can benefit from carefully constructed queries.

Consider this information when creating a CSV Data Request.

Note: These actions may not make a significant difference to an individual query, but during heavy system use, all users can benefit from carefully constructed queries.

Use parameters to restrict information return

To minimize the amount of data traveling over the network, use the available parameters to restrict the information returned. Ensure that your queries use the available parameters correctly. The Data Service returns a variety of information, some of which may not be used in each situation.

For example, a query with no related fields returns:

  1. The data for each requested field.

  2. A RECKEY node containing the key values for each record.

  3. An IDA node containing an integrated drill for each record.

A more complex query with related fields and related records returns the same information, plus additional data:

  1. Up to 25 or OTMMAX, whichever is greater, related records for each relation in each record.

  2. A RELDRILL node for each related field.

  3. A NEXTREF node for each related field where the number of related records is more than OTMMAX or 25, whichever is less.

  4. A NEXTCALL node for each set of related records where the number of related records is more than OTMMAX or 25, whichever is less.

Use parameters that apply to the call type

Do not use parameters specific to CSV output in a call that can return XML, and vice-versa.

For example, a query with OUT=CSV should not use XIDA=FALSE as that is a parameter specific to the XML output type. Although this has a minor effect on the performance of the query itself, it can be a source of confusion for those maintaining a program.

Avoid using processing-intensive nodes

Queries which include the RECKEY, IDA, RELDRILL, NEXTREF, and NEXTCALL nodes take longer than queries that do not, due to the logic necessary to retrieve information and build the calls.

For example,

  • A query with a MAX of five records, an OTMMAX of three records, and three fields, one primary and two related, produces output of 6.68 KB.

  • The same query with OTMMAX set to zero and a FALSE value for XIDA, XKEYS, XNEXT, and XRELS, produces output of 1.80 KB.

The difference increases rapidly as more records are requested.

Specify required fields

Craft queries to request only the fields that are required. If no fields are specified, the first 10 fields or all fields, whichever is fewer, is returned by default. If you require only a subset of those fields, request that subset.

Avoid using XCOUNT

Determining the total number of records a user can access requires iterating through all the records in a table and making security calls for each record.