Databases Reference
In-Depth Information
Example B: Measuring the Overall Operation
In contrast, this example takes a better approach because it samples the
CPU time at the start and end of the loop so the duration of the bench-
mark is measured over an entire period of 100 seconds—a sufficient
duration.
1.
Save the CPU time.
2.
Start the loop.
3.
Execute the SQL statements.
4.
End the loop.
5.
Save the CPU time.
6.
Determine the difference between the CPU time snapshots to arrive
at the CPU time.
Reproduce the Production Environment
It can be difficult and costly to reproduce your production environment, but to
provide useful and reliable benchmark results, your test environment should
resemble your production environment as closely as possible.
Design Your Test Environment
Before you design your test environment, you need to gather information about
the essential characteristics of your production environment so that you can
duplicate them in your test environment. See Table 9-1 for a list of important
questions you should ask before defining your test environment.
Table 9-1
Questions to Ask Before Defining Your Test Environment
Question
Explanation
What is the version of your
Database vendors can make changes between
database?
releases of database versions that cause SQL state-
ments to be evaluated differently. Similarly, data-
base drivers may act differently when accessing
different database versions.
 
Search WWH ::




Custom Search