Browsed by
Category: Database Performance

The database performance category is the place to dive into the depths of weird and interesting database behavior.

InnoDB vs. MyISAM – Which One Should You Choose?

InnoDB vs. MyISAM – Which One Should You Choose?

InnoDB and MyISAM are two of the most widely used MySQL storage engines. Each of them has its own pros and cons – we will try to go over them in this article. Briefly about MyISAM MyISAM was a storage engine used in MySQL prior to version 5.5 which was released in December 2009. MyISAM is based on an old ISAM storage engine which is no longer available as of MySQL 3.23 – the Indexed Sequential Access Method engine was…

Read More Read More

MySQL Deadlocks 101

MySQL Deadlocks 101

Sometimes when dealing with MySQL you might come across this slightly frustrating error: ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction This error message covers deadlocks – this is what we will try to explore in this post. What is a Deadlock? A deadlock occurs when different transactions are unable to proceed because each of them holds a lock that the other needs. As a result, none of the transactions succeed. This picture illustrates a…

Read More Read More

Identifying Slow Queries in MySQL: Slow Query Log 101

Identifying Slow Queries in MySQL: Slow Query Log 101

When MySQL performance issues are encountered, one of the first things troubleshooting developers do is identify long running queries and optimize them. We will take a look at a MySQL feature that helps you identify long running queries – MySQL slow query log. Understanding the Slow Query Log In MySQL, the slow query log consists of SQL statements that take more time to execute than defined in the long_query_time system variable. The system variable’s minimum and default values are 0…

Read More Read More

Understanding MySQL: The Power of Indexing

Understanding MySQL: The Power of Indexing

When talking about query optimization, indexing is one of the first topics that gets covered. In this post we will cover the types of indexes, why they might be important, their benefits and cons. Although it’s almost impossible to cover everything related to indexes in one post (the entire subject deserves a book), we will try to dig deeper and figure out the differences of multiple types of indexes and where they might be used. What are Indexes? Indexes (also…

Read More Read More

Slow SQL Queries? Don’t Blame MySQL (yet)

Slow SQL Queries? Don’t Blame MySQL (yet)

SQL queries being slow is one of the main complaints directed at MySQL. Why are queries slow? What’s making SQL queries slow? How to make them faster? We will explore some suggestions which could (hopefully) point developers in the right direction – we will look at optimizing all four CRUD operations – Create, Read, Update and Delete. Understand what You’re Dealing With As far as MySQL is concerned, developers have a few choices when dealing with the RDBMS. They can…

Read More Read More

MySQL and Big Data – Mission Possible?

MySQL and Big Data – Mission Possible?

MySQL is a widely used open-source relational database management system. As much as this RDBMS is widely used though, in certain aspects it is frequently misunderstood. One of those aspects is big data – should you run big data applications on MySQL? Should you use MongoDB? Maybe you should take a look at neo4j or even AWS Redshift? We will try to explore that in this post. Understanding MySQL and Big Data Before we begin diving deeper into MySQL and…

Read More Read More