Using the call
Consider this information when creating a CSV Data Request.
Consider this information when creating a CSV Data Request.
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:
-
The data for each requested field.
-
A
RECKEY
node containing the key values for each record. -
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:
-
Up to 25 or
OTMMAX
, whichever is greater, related records for each relation in each record. -
A
RELDRILL
node for each related field. -
A
NEXTREF
node for each related field where the number of related records is more thanOTMMAX
or 25, whichever is less. -
A
NEXTCALL
node for each set of related records where the number of related records is more thanOTMMAX
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, anOTMMAX
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 aFALSE
value forXIDA
,XKEYS
,XNEXT
, andXRELS
, 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.