Recent Posts (mysql)
Indexes vs. Partitions in RDBMS: Understanding Their Differences and Power Together
- By Ercan
- 08/11/2025
When a query runs slowly, most developers instinctively think: “We need an index.” But while indexes are essential, they’re only part of the performance equation. In large-scale systems, data placement matters just as much as data access. That’s where partitioning comes in. Together, indexes and partitions can turn a sluggish query into a lightning-fast one — if designed correctly. This article explores how indexes and partitions differ, where they overlap, and how combining them strategically can yield remarkable performance improvements. Indexes and Partitions: Similar Goals, Dif..
Trying MySQL MEMORY Tables as a Simple Cache (and Failing Spectacularly)
- By Ercan
- 26/10/2025
Sometimes you want a quick in-app cache without adding Redis or Hazelcast. MySQL MEMORY tables look promising: “RAM-resident, fast, simple”. Curious, I decided to test it myself on a local development environment. Environment MySQL Server: 9.5.0 (Homebrew, default settings except max_heap_table_size) Local machine: MacBook Pro 15-inch, 2019, 2.3 GHz 8-Core Intel Core i9-9880H, 16 GB RAM MEMORY table max_heap_table_size: increased to 512 MB to accommodate 1 million rows Test scenario: 50 parallel threads Insert 1 million OTP tokens 50,000 read queries Benc..
Advanced MySQL Query Techniques
- By Ercan
- 19/07/2025
Most developers interact with MySQL through familiar CRUD operations — simple SELECT, INSERT, and UPDATE statements. But MySQL 8 introduced a new set of powerful features that can handle advanced analytical use cases, hierarchical data, and complex aggregations directly within SQL. In this guide, we’ll explore practical, non-standard but extremely useful query patterns, all using plain MySQL 8+. Each section includes example tables, real-world use cases, and a short explanation of how and why the query works. 💡 Note: All queries in this article require MySQL 8.0 or higher (due to CTEs,..
Installing MySQL on MacOS
- By Ercan
- 26/06/2025
If you're developing locally on a Mac and prefer running MySQL natively instead of using Docker, this guide is for you. I personally run several personal projects on my MacBook and want my data to persist without relying on containers. Here’s how to install and secure MySQL using Homebrew, with architecture-specific instructions for Apple Silicon and Intel-based Macs. Step 1: Install MySQL brew install mysql By default, MySQL creates a root user without a password. For security reasons, I prefer setting a password manually. Step 2: Start MySQL Temporarily brew services ..
