Browsed by
Year: 2020

What Should You Do After a Data Breach?

What Should You Do After a Data Breach?

Rarely a day passes by without another data breach hitting the Internet – if you have an account on any website, chances are that your digital identity has been stolen or at least there were attempts to steal it. While we have covered how to prevent being impacted by data breaches in the future (we have even discussed how to secure MySQL!), we have not yet covered what you should do after a data breach. This blog post will explain…

Read More Read More

MySQL After a Data Breach

MySQL After a Data Breach

As we all know, data breaches occur all too often. After a data breach occurs, we are used to seeing security experts, company associates and other people advising us to change our passwords and safeguard our data by securing our infrastructure. This is what the majority of developers do – we secure our infrastructure, maybe hire some information security consultants for advice on how to prevent data breaches in the future and forget about the data breach as time passes….

Read More Read More

InnoDB From the Inside: ibdata1 and the Log Files

InnoDB From the Inside: ibdata1 and the Log Files

The ibdata1 file is arguably the most important file in the entire InnoDB infrastructure. Without the file InnoDB simply could not function – we will explore why in this post. What is ibdata1 and Why Is It So Important? The ibdata1 file is the system tablespace for the InnoDB infrastructure – the file contains vital information for the InnoDB storage engine. Here’s how the infrastructure of InnoDB looks like (note the ibdata1‘s place on the right): The ibdata1 contains several…

Read More Read More

Optimizing MySQL Query Performance with DESCRIBE and EXPLAIN

Optimizing MySQL Query Performance with DESCRIBE and EXPLAIN

DESCRIBE and EXPLAIN statements are two of the most common statements that concerns MySQL performance issues. When you ask people how to optimize a query, the DESCRIBE and EXPLAIN statements are one of the first ones that get mentioned. We will explore them in this article. Understanding DESCRIBE The DESCRIBE statement is primarily used when the need to find out information about each of table’s columns arises. This is how the output of a DESCRIBE statement looks like: Here’s what…

Read More Read More

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