SQL Indexes and Query Performance Basics
How B-tree indexes work, when CREATE INDEX helps, when it hurts, what EXPLAIN tells you, and the concept of selectivity that decides whether an index is worth its cost.
54 posts · page 2 of 2
How B-tree indexes work, when CREATE INDEX helps, when it hurts, what EXPLAIN tells you, and the concept of selectivity that decides whether an index is worth its cost.
A practical tour of INNER, LEFT, RIGHT, FULL OUTER, and CROSS joins — when to reach for each, how ON differs from USING, and the Cartesian-product mistake that catches everyone once.
Where each database shines, where each frustrates, the dialect differences that bite when you port code (LIMIT vs TOP, autoincrement, JSON, full-text), and the hosting concerns that decide for you.
A practical introduction to SELECT, FROM, WHERE, ORDER BY, LIMIT, and DISTINCT — with a running users and orders dataset so every query has real meaning.
Compose queries from smaller queries — scalar, row, and table subqueries, IN/EXISTS/ANY, correlated subqueries, WITH clauses, and a peek at recursive CTEs. When to prefer a CTE for readability.
A clear, no-hype introduction to SQL — what relational databases are, why declarative querying matters, the main dialects, and when SQL beats spreadsheets or NoSQL.