Every MySQL backed application can benefit from a finely tuned database server. The Liquid Web Heroic Support team has encountered numerous situations over the years when some minor adjustments have made a world of difference in website and application performance. In this series of articles, we have outlined some of the more common recommendations that have had the largest impact on performance. Continue reading “MySQL Performance: Identifying Long Queries”
A major factor in database performance is the storage engine used by the database, and more specifically, its tables. Different storage engines provide better performance in one situation over another. For general use, there are two contenders to be considered. These are MyISAM, which is the default MySQL storage engine, or InnoDB, which is an alternative engine built-in to MySQL intended for high-performance databases. Before we can understand the difference between the two storage engines, we need to understand the term “locking.” Continue reading “MySQL Performance: MyISAM vs InnoDB”
As we explored in our previous article of our MySQL Performance Series: MySQL vs. MariaDB there are very few downsides to using MariaDB over standard MySQL. Our high-availability MariaDB’s have proven itself to be a worthy successor with easily mitigated drawbacks. As the last article in our series we will focus on upgrading to various MySQL and MariaDB version on the following servers:
- MySQL to MariaDB on CentOS 6/7 with cPanel
- MySQL to MariaDB on CentOS 7 with Plesk Onyx 17
- MySQL 5.1-5.5 to MariaDB 5.5 on CentOS 6
- MariaDB 5.5 to MariaDB 10.0 on CentOS 6
The majority of work needed when adjusting the MySQL server is editing the applicable directives within a MySQL configuration file. There are multiple, optional configuration files that MySQL looks for when starting up. They are read in the following order: Continue reading “MySQL Performance: System Config & Routine Maintenance”
As discussed earlier in our MySQL Performance series, the InnoDB storage engine is designed to be a high-performance database for very large datasets. The row-locking technique it uses allows for many read and write requests to occur on a single table concurrently. This is a vast improvement in speed over traditional Continue reading “MySQL Performance: InnoDB Buffers & Directives”
MyISAM is a table-locking based engine. Table-locking prevents all other processes from writing data to the target table. This locking behavior encompasses the entire MyISAM table, no matter how minor the data change. This type of locking preserves the integrity of the data but at the cost of performance. The performance penalty for using table-locking based engines like MyISAM become more laborious as the row count in the table grows. Very large tables will see a significant delay in performance when data needs to be written to a MyISAM table.
Data in a MySQL/MariaDB database is stored in tables. A simple way of thinking about indexes is to imagine an extensive spreadsheet. This type of system is not always conducive to quick searching; that’s where an index becomes essential. If there is no index, then the database engine has to start at row one and browse through all the rows looking for the corresponding values. If this is a small table, then it is no big deal, but in larger tables and applications where there can be tables with millions and even billions of rows, it becomes problematic. As you can imagine, searching through those rows one by one will be time-consuming, even on the latest hardware. The solution is to create an INDEX (or more than one) for your data.Continue reading “MySQL Performance: MySQL/MariaDB Indexes”
In this article, we will learn the basics of joining tables in SQL. We will learn about Left, Right, Inner, and Outer joins and give examples of how to use them.
Data in an RDBMS (Relational Database Management System) is grouped into tables. These tables have a rigid definition of the type of data that can be stored in them. To connect different tables, and thus different types of data that may relate to each other, we will use the JOIN clause.Continue reading “MySQL Performance: Intro to JOINS in SQL”