Categories
MySQL

A Big Decision in Identity Selection: INTEGER or BINARY?

Choosing an identity in the world of databases is not as simple as it may seem. In fact, the choice of each identity (or ID) is part of a much larger strategy. “Life is short, data types are long,” someone once said (of course, they didn’t actually say it, but it would have been very cool if they had). This article leaves you face-to-face with the question “INTEGER or BINARY?” and aims to help you find the correct answer to it.

Categories
MySQL

The King Slayer of MySQL: Solving the N+1 Query Problem

Let’s take a lesson from the world of A Song of Ice and Fire: “Chaos is a ladder.” But this rule does not apply to MySQL queries! On the contrary, if you let chaos into your queries, your performance can tumble down a cliff. Introducing the sinister N+1 Query Problem, the silent killer of database performance.

Categories
MySQL

MySQL with “INSERT INTO … ON DUPLICATE KEY UPDATE”: Advantages and Disadvantages of a Fun Approach

Hello MySQL enthusiasts! Today, we’re diving into a commonly used yet often underrated topic in the world of databases: the “INSERT INTO … ON DUPLICATE KEY UPDATE” statement. In this article, we’ll explore the advantages and disadvantages of this handy SQL command while also taking a look at what’s happening behind the scenes.