#Database
29 posts
Why Redis Is Fast — Memory, a Single Thread, and Data Structures
The structural reasons Redis handles hundreds of thousands of requests per second: memory access with no disk in the path, a lock-free single-threaded event loop, and purpose-built data structures — plus the single-thread trap (one slow command stalls everything) and the cases where Redis gets slow.
What a Database Index Actually Does — B-trees, Lookup Cost, and the Price of Writes
How indexes make lookups fast, from the B-tree up: the cost gap versus full scans, composite indexes and column order, why indexes are not free (write cost, storage), and the working rules for what to index and what to leave alone.
Why Your Server Is Slow #5: When the Database Slows Down — Indexes, Locks, Connection Pools
Tracking down why a database that ran fine is getting slower. Covers full scans collapsing the day data growth crosses a threshold, indexes that exist but never get used, lock wait chains rooted in long transactions, telling pool exhaustion from database saturation, and a diagnostic order built on EXPLAIN and the statistics views.
AWS Intermediate #4: RDS — managed DB, backups, parameter groups
AWS's managed relational database, RDS. Comparison vs DB-on-EC2, automated backups and snapshots and PITR, Multi-AZ, parameter / option groups, and how to handle minor vs major upgrades operationally.
Go Practice #4 DB Integration — database/sql and Transactions
database/sql basics, prepared statements, transactions, and connection pool tuning. Plus higher-level tools like sqlc, sqlx, and GORM.