Database Tuning: Principles, Experiments, and Troubleshooting Techniques

The goal of this chapter is to describe the fundamental architecture underlying every e-commerce system and to discuss the tuning considerations that apply to that architecture. Even if your system has added bells and whistles on top of these services, you would do well to start tuning these fundamentals. We conclude the chapter by discussing capacity planning.
E-commerce applications often have a three-tiered architecture consisting of Web servers, application servers, and database servers (Figure 8.1).
Web servers are responsible for presentation. They call functions from the underlying application servers via server extensions such as servlets or dynamic HTML interpreters such as ASP. They deliver HTML or XML pages back to the client browsers.
The application servers are responsible for the business logic. They implement the functions exposed to the clients. Typically, these functions include search, update shopping cart, pay, or create account. Each function uses data from a local cache or from the underlying database server and outputs HTML or XML pages.
The database servers perform data access.
The question for the database tuner is to fix bottlenecks at the interface between the application servers and the database servers or within the database servers. This is critical for these applications because sites that display pages in nine seconds lose 10% more customers...