By default, each relationship's relationship tables are stored in the relationship database. Each time a relationship retrieves or modifies run-time data, it uses SQL statements to access this database. If the relationship tables are accessed frequently, these accesses can have a significant impact on performance in terms of CPU usage and InterChange Server Express resources. As part of the design of a relationship, you can determine whether to cache these relationship tables into memory.
To make this decision, you need to determine how frequently the relationship's run-time data changes. The WebSphere business integration system allows you to categorize your relationship in one of two ways:
You define whether a relationship is dynamic or static from the Advanced Setting dialog for the relationship definition. The following sections summarize how to define a dynamic and static relationship from this dialog. For information on how to display the Advanced Setting dialog, see "Specifying advanced relationship settings".
For a dynamic relationship, InterChange Server Express accesses the run-time data from its relationship tables in the relationship database. By default, InterChange Server Express assumes a relationship is dynamic. Therefore, you do not have to take any special steps to define a dynamic relationship:
System Manager lists all dynamic relationships in the folder labeled Dynamic under the Relationships folder.
For a static relationship, InterChange Server Express can access the run-time data from cached relationship tables. With caching enabled for the static relationship, InterChange Server Express stores a copy of the relationship tables in memory. When making the decision to cache relationship tables, try to balance the following conditions:
In this case, the server does not need to use SQL statements to access the relationship database for the run-time data. Instead, it can access memory for this data, which is much faster. If the run-time data for a static relationship is not currently in memory, InterChange Server Express reads the appropriate relationship tables from the database into memory when the data is first accessed. For future accesses, InterChange Server Express uses the cached version of the tables.
However, once the table is read into memory, InterChange Server Express must maintain consistency between the relationship tables in the database and the cached tables. For Update, Insert, and Delete operations, InterChange Server Express must modify both the database tables and the cached tables. This double update can be very performance intensive. When you determine whether to cache a relationship's tables, consider the expected lifetime and refresh rate of the data.
Recommendation: You should not cache a relationship table that contains more than 1000 rows.
Important: InterChange Server Express does not check for excessive memory usage. You must ensure that memory usage remains within the limits that your system imposes.
To define a static relationship, display the Advanced Settings dialog (see Figure 96) for the relationship definition and set the Static field from this dialog as follows:
When the Static field is enabled, the Advanced Settings dialog also enables the Cached field. The Cached field allows you to control when InterChange server actually caches the relationship's table:
You can only control caching for a relationship that is defined as static.
For more information on caching and reloading relationship tables, see the User Guide for WebSphere Business Integration Express for Item Synchronization.