Skip to content
Tagged articles

generated column

6 articles · Page 1 of 1
LuTiao Programming
LuTiao Programming
Nov 7, 2026 · Databases

Logical Delete vs Unique Index: The Duplicate Entry Trap and the Generated Column Fix

The article explains how logical deletion conflicts with unique indexes in MySQL, shows why a composite index on (code, deleted) only supports one delete-create cycle, and presents a robust solution using a generated column that becomes NULL when deleted, leveraging MySQL's allowance of multiple NULLs in unique indexes to enforce uniqueness only on active records.

Multi-tenancyMySQLUnique Index
0 likes · 15 min read
Logical Delete vs Unique Index: The Duplicate Entry Trap and the Generated Column Fix
Java Tech Workshop
Java Tech Workshop
Nov 1, 2026 · Databases

MySQL Unique Indexes Allow Multiple NULLs: Why It Happens and How to Enforce True Uniqueness

This article explains why MySQL unique indexes permit multiple NULL values due to SQL's three-valued logic, demonstrates how this breaks upsert statements and causes silent duplicates, compares behavior across databases, and presents solutions using NOT NULL constraints, generated columns, and functional indexes to enforce true uniqueness.

InnoDBMySQLNULL handling
0 likes · 16 min read
MySQL Unique Indexes Allow Multiple NULLs: Why It Happens and How to Enforce True Uniqueness
Architect's Tech Stack
Architect's Tech Stack
Jan 22, 2026 · Databases

Unlock MySQL 8.0: 8 Hidden Optimization Tricks You Must Know

This article reveals eight powerful, lesser‑known MySQL 8.0 features—including window functions, descending indexes, generated columns, invisible indexes, optimizer hints, resource groups, LATERAL JOIN, and multi‑valued JSON indexes—showing how they dramatically improve query performance and simplify complex SQL tasks.

LATERAL JOINResource GroupSQL Optimization
0 likes · 12 min read
Unlock MySQL 8.0: 8 Hidden Optimization Tricks You Must Know