The data tier will make or break most distributed applications. This chapter considered some principles that no distributed programmer can afford to ignore, including connection pooling, caching, and optimization. All of these techniques are useful ingredients in the programmer's toolbox, but it's not always obvious when you should use them. As with any performance-optimization strategy, the only way to gauge the value of a change is to perform stress testing and profiling. Without this step, you might spend a great deal of time perfecting code that will achieve only a minor improvement in performance or scalability, at the expense of more effective changes. Chapter 14 introduces the art and science of profiling. Finally, every programmer would do well to consider three basic tips for ensuring good database performance:
Learn the enhancement techniques for your RDBMS. Database products almost always support standardized SQL syntax and similar features, but they differ widely in performance optimization techniques. You need to understand these to coax the best possible performance from them. |