Fundamentals Of Database Engineering By Hussein Nasser Repack «Real»
| Metric | Why | |--------|-----| | | Throughput baseline | | Slow query log | Find bad queries | | Cache hit ratio | >99% is good, <95% means undersized cache | | Replication lag (in seconds) | Avoid stale reads | | Disk IOPS and latency | Often the real bottleneck | | Connection count | Too many = resource exhaustion |
SELECT FOR UPDATE , foreign key checks, and DDL. 10. Monitoring and Observability You cannot fix what you cannot measure. Every database engineer must monitor: fundamentals of database engineering by hussein nasser
A database engineer doesn’t just use a database; they , tune , and troubleshoot it. They know why a query is slow, why a replica fell behind, or why VACUUM in PostgreSQL didn’t reclaim space. “A database is just files. Everything else is optimization.” — Hussein Nasser 1. Storage Engines: The Foundation At the core of every database lies the storage engine . It determines how data is written to and read from disk. Two Main Families: | Engine | Strategy | Best For | Examples | |--------|----------|----------|----------| | Log-Structured Merge (LSM) Tree | Sequential writes, immutable files | High write throughput | Cassandra, RocksDB, LevelDB | | B-Tree | In-place updates, balanced tree | Fast reads, transactions | PostgreSQL, MySQL (InnoDB), SQLite | | Metric | Why | |--------|-----| | |