Skip to content
← Back to all lessons

TodayILearned

Databases lessons

One fullstack engineering concept every day โ€” taught deeply, then compressed into a public post.

Day 001 ยท June 23, 2026

Why does an index speed up a query?

And the part nobody mentions: when it actually makes things worse.

Databases ๐ŸŽฌ Video
Day 003 ยท June 25, 2026

Reading EXPLAIN output

How to see what the database is actually doing โ€” and whether your index is being used.

Databases ๐ŸŽฌ Video
Day 006 ยท June 30, 2026

Composite indexes โ€” the leftmost prefix rule

When you index multiple columns, order matters. Here's why โ€” with a real benchmark.

Databases ๐ŸŽฌ Video
Day 008 ยท July 2, 2026

Connection pooling โ€” sharing database connections

Every database connection is expensive. A pool keeps a few warm and reuses them โ€” the load balancer's cousin, one layer deeper.

Databases ๐ŸŽฌ Video
Day 010 ยท July 4, 2026

Transactions and ACID โ€” when all or nothing is the point

A connection pool gives you a connection. A transaction is what you do inside it โ€” a unit of work that either fully succeeds or fully fails.

Databases ๐ŸŽฌ Video
Day 013 ยท July 7, 2026

Database normalization โ€” 1NF, 2NF, 3NF

Three normal forms, three problems they solve. Normalization prevents anomalies; denormalization trades safety for speed.

Databases ๐ŸŽฌ Video
Day 015 ยท July 9, 2026

JOINs โ€” when two tables become one

Normalization split your data into honest tables. JOINs stitch it back together โ€” at a cost. The planner picks the algorithm, but you control the indexes that make it fast.

Databases ๐ŸŽฌ Video
Day 017 ยท July 10, 2026

Keyset Pagination โ€” Why OFFSET Breaks at Scale

Your API returns page 500 in 50ms. Page 5000 takes half a second. Page 10000 takes two seconds. The user is just clicking 'next page' โ€” so why does each page get slower? The answer is OFFSET, and the fix is a cursor.

Databases ๐ŸŽฌ Video
Day 020 ยท July 13, 2026

Covering indexes โ€” when the index is enough

An index finds rows fast. A covering index returns the data too โ€” PostgreSQL skips the table entirely. Heap Fetches: 0 is the magic line in EXPLAIN.

Databases ๐ŸŽฌ Video