MySQL Generated Invisible Primary Keys: GIPK Mode in Production
PK-less InnoDB tables silently tax replication and tooling. GIPK mode fixes them at CREATE TABLE time, if you know what my_row_id changes and what it quietly breaks.
Notes for the problems that show up after launch: bad plans, awkward migrations, index debt, vacuum pressure, replica lag, and the small decisions that make PostgreSQL easier to operate.
PK-less InnoDB tables silently tax replication and tooling. GIPK mode fixes them at CREATE TABLE time, if you know what my_row_id changes and what it quietly breaks.
MySQL ships two unrelated features both called InnoDB compression, and picking the wrong one costs memory, CPU, or both. Here is how each actually works and when either still pays.
Replication filters diverge replicas without raising a single error, and source-side filters quietly gut your point-in-time recovery. Here is how each layer actually fails.
innodb_io_capacity is a background I/O budget, not a speed dial. Crank it past your redo-driven need and the page cleaner spends the surplus evicting warm pages you were about to read.
MySQL 8.0 replaced block nested loop with a real hash join, and half the join-tuning advice from the 5.7 era is now wrong. When the optimizer hashes, when an index beats it, and when it loses.
ORDER BY col1 ASC, col2 DESC forced a filesort for two decades of MySQL. Since 8.0, a composite with a real descending part resolves it straight from the index — if the directions match exactly.
InnoDB skips transaction bookkeeping for known read-only transactions — but an open read view still pins purge. The autocommit=0 ORM trap, replica read-only flags, and how to measure the win.
innodb_dedicated_server sizes your buffer pool and redo from detected hardware. On a truly dedicated box it is right; inside a memory-limited container it can size you straight into an OOM kill.
Prepared statements are per-connection state with a server-wide cap. Prepared_stmt_count, error 1461, the ORM leak pattern, and why per-query prepare is the worst of both protocols.
Undo growth means a snapshot is pinning purge. How innodb_undo_log_truncate reclaims space, managing tablespaces with CREATE and DROP UNDO TABLESPACE, and the stuck-report incident shape.
Mode 0 holds a table lock to the end of every insert, mode 1 only for bulk loads, mode 2 never. Why 8.0 defaults to 2, what that does to statement-based replication, and how to stop fearing ID gaps.
A crash mid-ALTER on 5.7 left orphaned #sql tables and dictionary mismatches you fixed with file surgery. MySQL 8.0's transactional data dictionary ended that era — and quietly retired a few other habits.