tips to improve performance of mysql

10
By Convergence IT Services Pvt. Ltd 5 TIPS TO IMPROVE PERFORMANCE OF MYSQL

Upload: convergence-it-services

Post on 23-Mar-2016

214 views

Category:

Documents


1 download

DESCRIPTION

MySQL is one of the most flexible relational databases to work with for adding, accessing and managing content in a database, but at times it can be unpredictable and painfully slow. This can hamper your work and can bring your applications to a screeching halt.

TRANSCRIPT

By

Convergence IT Services Pvt. Ltd

5 TIPS TO IMPROVE PERFORMANCE OF MYSQL

A. What is MySQL1. Define server workload2. Understand CPU, Memory, Disk, and Network3. Remove unused indexes4. Do not concentrate too much on configuration5. Monitor the database

Visit: support.convergenceservices.in Call: +91 22 2513 6632 2

Table of Contents

3

What is MySQL

MySQL is one of the most flexible relational databases to work with for adding, accessing and managing content in a database, but at times it can be unpredictable and painfully slow. This can hamper your work and can bring your applications to a screeching halt.

At times the common mistakes underlie the MySQL performance. To

overcome this problem and to ensure your MySQL server moves along at top speed, providing stable and consistent performance, it is important to eliminate these mistakes by using simple yet effective performance tuning method.

Visit : support.convergenceservices.in Call: +91 22 2513 6632

4

Tip No.1: Define server workload

Profiling your workload will give you an opportunity to expose the most expensive queries so that you can fine tune it further. And the best way to profile your workload is through the use of tool such as MySQL Enterprise Monitor's query analyzer or the pt-query-digest from the Percona Toolkit. This tool will capture server queries and shows you most expensive and time-consuming tasks. This way you can take most informed decision.

Visit : support.convergenceservices.in Call: +91 22 2513 6632

5

Tip No.2: Understand CPU, Memory, Disk, and Network

If any of the four fundamental resources like CPU, Memory, Disk, and Network is underpowered or weak or there is an overload of some sort then it will severely affect the database performance. Hence choosing a right hardware is very important. At times companies buy faster processor or CPU but will starve the system for Memory thereby severely affecting the MySQL performance. Care should be taken to check the performance of the four resources from time-to-time and troubleshoot if you come across any issues.

Visit : support.convergenceservices.in Call: +91 22 2513 6632

6

Tip No.3: Remove unused indexes

Indexes which are not used for long and are redundant must be removed so as to improve the performance of MySQL. Too many indexes decreases the performance. If you have more IO the you need more CPUspace to update all index. Also remove the same prefix indexes.

Visit : support.convergenceservices.in Call: +91 22 2513 6632

7

Tip no 4: Do not concentrate too much on configuration

Many Database Administrator spend their time configuring and tweaking database system. Though it is good at times but overdoing can prove damaging. It is important to know everything about your MySQL and change settings only it is needed. In most cases, you can get 95 percent of the server's peak performance by setting about 10 options correctly.

Visit : support.convergenceservices.in Call: +91 22 2513 6632

8

Tip No 5: Monitor the database A monitoring tool is a Database Administrator best buddy. It can be used

in two ways – to capture metrics and to get notification. Hence if someday you are encountered with some issue you know where to check for the problem or what exactly is causing the particular problem. But getting too many notification or alert like buffer hit ratio or the number of temporary tables can be overwhelming.

When you get an alert with a specific actionable problem then this type of notification helps you to offer a solution. If you get a notification for a server that doesn’t respond to a connection attempt then it requires instant troubleshooting.

Visit : support.convergenceservices.in Call: +91 22 2513 6632

9

For more Information

If you need more information about the services we offer then feel free to call us on +91 22 2513 6632 or visit @ support.convergenceservices.in

Visit : support.convergenceservices.in Call: +91 22 2513 6632