Performance: Measuring Database Performance
Download this article in PDF format
Poor database performance is often neglected since it is
occasionally identified in two instances: during development - hopefully before
customers and clients notice problems - and when slow performance is obvious
and detrimental to your customers and clients.
Aside from the need to immediately fix slow database
performance affecting users, the question that is rarely asked is, “when did
the performance problem start?” The
answer to the question is easily answered if the database is being monitored
throughout its lifecycle.
Websites driven by database back-ends are held ransom to a
database’s performance. Because of this,
an effective website monitoring strategy includes monitoring of a database server,
pages that use a large number of database queries and pages that use
potentially problematic database queries.
Focusing on database queries, a page that uses a large
number of them is a prime candidate for monitoring on a continuous basis, i.e.
once every 5 minutes, 24 hours a day, 7 days a week. In
addition, one or all of the queries employed by that web page should also be
monitored by directly running those database queries and measuring the amount
of time taken to connect to the database and execute the query. Comparing statistics side-by-side will help
pinpoint potential problems when analyzed by time of day, day of week, and
basic website traffic statistics.
Furthermore, database queries that are not seen as a problem in
development can emerge as a problem after deployment with monitoring and
historical data.
Web pages that have known long running queries should be
monitored to determine when they are at their worst and if it is acceptable
that they remain unchanged. For example,
a database query used in a batch reporting process that is known to take a long
time may be perfectly acceptable since it may run in off-hours.
Database monitoring is essential for database performance
measurement. Only through the gathering
of performance data can educated decisions be made to improve poor performance,
and instituting an effective database strategy should begin early.
|