6 Causes Poor Database
6 Causes Poor Database
Causes of
Poor Database
Performance
. . . and what to do about them
6 Poor Database
Common
Causes of
Performance
. . . and what to do about them
With all these interdependencies, it’s important to ask good questions as you consider the
design of your database infrastructure. Here are a few:
Thorough testing helps prevent deployment issues, but problems can still be missed.
Before you go to production, deploy your database in a test environment first and make
sure you have a backup of your data. Also, implement version control of your database and
schemas so you can roll back if something goes wrong and easily trace who did what and
when. Traceability allows you to more quickly isolate and fix issues.
More than the database, network-related issues are usually the biggest cause of deploy-
ment related problems. Even in the same data center, adding multiple switches or slow
firewalls between the application server and the database can multiply latency.
Finally, if you place the database server and application/web server in different availability
zones or data centers, the latency increase gets even more dramatic. As you decide where
your data will sit, keep in mind that data needs to be near running applications to minimize
latency and provide a highly performant user experience.
3
: Software Misconfigurations
The configuration of software components is important to database performance.
Just one misconfiguration can not only slow your applications, but cause downtime,
data corruption, data loss, and security breaches.
Creating indexes for solving queries is a good habit, but you need to use them wisely.
Consider maintaining your indexes from time to time, dropping all duplicates and unused
indexes that may slow down performance.
5
: Resource Saturation
Database systems have only so much memory, CPU, disk IO, and network resources,
and can’t do more than their constraints allow. Optimizing your software configuration,
schema, and queries places less demand on these types of resources. For example, a web
application developer may write code that involves several separate queries instead of
batching them, which unnecessarily increases load on the CPU and memory.
Designing for efficient resource usage is important, but so is having a way to continually
monitor that usage so you can address problems as they arise. Consider using a monitor-
ing tool that provides features that allow you to analyze your database queries and identify
and fix issues as quickly as possible. It should also provide well-designed dashboards
that give you easy insight into system metrics, such as CPU, network, memory, and
disk performance.
Here again having a tool that gives you deep insight into what’s happening in your data-
base system allows you to determine whether the problem is with the database, and if so,
identify what it is. This should be a database-focused tool for in-depth troubleshooting and
investigation so you can fully understand the health of your infrastructure.
It should include capabilities for monitoring the state of your systems based on predefined
sets of metrics. It should also provide observability, which gives you deep visibility into the
internal states of your systems, helping you actively discover the “unknown, unknowns.”
About Percona
Percona is widely recognized as a world-class open source database software, support, and
services company. The organization is dedicated to helping businesses make databases and
applications run better through a unique combination of expertise and open source software.
Percona works with numerous global brands across many industries creating a unified experience
for monitoring, managing, securing, and optimizing database environments on any infrastructure.
Percona equips organizations with the freedom to choose, the freedom to create, and the
freedom to make a difference - helping them scale and innovate with speed as they grow.
For more information, visit percona.com.