English

Problem: JOINITEM runs for a long time

Solution or Workaround

What would cause JOINITEM to run for several hours or more to process a file?

Answer:

Several factors affect the length of time required for JOINITEM to process a file: the number of items in the file, the number of records in the file, items being joined close to beginning rather than at the end of the file, presence or absence of item indexing, and efficiency of the computer being used. Relates probably have the most impact on processing time. By default, the relate type is LINEAR, which, depending on the arrangement of the data, can be one of the slower relate options. Tests have shown that RELATE performance varies as follows, in order of speed, from fastest to slowest:

LINK
LINEAR (both files ordered)
ORDERED
LINEAR

Sorting both RELATE items makes a linear relate faster. Re-indexing the relate item increases performance as well. Use ORDERED for large files, making sure to sort the join file in ascending order by the relate item.

If the files have not been indexed, or a LINEAR relate is used, the JOINITEM process could scan the whole data file before finding a match. The system may not use a lot of CPU but may generate a process called DIRECT IO, which performs the search for a matching record.

Notes:

See "Managing Tabular Data" for more information on RELATES and the ARC Command References for more information on JOINITEM.