Performance Tricks


Once you have finished the first cut of your application you will almost always feel the need to improve performance. The general pattern for this is a bit too abstract to offer real help. Simply the fact that you would have a hard time to assign a name other than performance optimization to it is an indicator that this a general rule - and not a pattern.

Problem

How do you optimize performance in an application using a database?

Forces

The forces here are your wish for optimal performance on the one hand and the complexity and cost of an optimal access layer on the other hand. Other tradeoffs include memory usage (caching) versus use of slow I/O. See [Kel97] or [Kel+98a] for extensive lists.

Solution

Try to reduce database traffic and disk I/O to a minimum that still yields a maintainable application at reasonable cost

The above "solution" contains balancing of forces as the solution - it is therefore no ready solution. A deeper analysis of the factors that cause bad performance leads to a series of patterns that can be split into two categories.

Pattern List

The first category Optimizing Table Structures and Queries has been documented in [Kel+97]:

The other category Optimizing General Design has been Published in a 1998 PLoP article:


-> on to Web Ressources

-> up to the Contents Page