Optimizing Repository Performance
The biggest factor that affects repository engine performance is the number of round trips the repository engine makes to the underlying database system. As a result, reducing the number of round trips is the single best solution to improving repository engine performance. To be able to minimize the number of round trips, you must understand the repository engine data access strategy. Once you understand this strategy, you can use the tips and hints listed here to improve repository performance.
Data Access Strategy
The repository engine maintains a cache of repository objects. When accessing an object by object identifier or by way of a relationship, the engine first looks in its cache. Similarly, the engine maintains a cache of relationship collections. When accessing a collection on a repository object, the engine first looks in its cache.
Because round trips to the database are expensive, the engine fetches and updates data in batches. For example, when you access a relationship collection, the engine fetches all the relationships in the collection. The engine caches the updates that a transaction performs, and (unless the cache overflows) sends them to the database only when the transaction commits. There are many other cases, too numerous to mention here, where the engine performs batching.
Many of the engine's caching and batching strategies are universally beneficial and require no special consideration when writing an application. However, sometimes the application's usage pattern can have a significant performance effect. The benefits of the caching and batching strategies often require a tradeoff of functional flexibility; consequently, none of the hints can be blindly applied without consideration of possible tradeoffs.
Tips and Hints
The following table lists the tips and hints that you can use to improve repository engine performance.
Topic | Description |
---|---|
General Hints to Improve Performance | Provides general hints about using cached data and storing data |
Retrieval Hints | Discusses alternate ways of retrieving data from a repository database |
Update Hints | Provides information about update behavior that you can use to improve engine performance |
Versioning Hints | Offers a versioning tip that improves performance |
Run-Time Tuning | Discusses options that you can set to improve run-time performance |
Adjusting Cache Aging for Repository Objects | Explains how you can adjust ageout behavior for specific kinds of rows |
View Hints | Offers hints that improve the performance of views when querying a database |