B-Tree Composite Indexes and the Leftmost Prefix Rule
When querying tables with millions of rows:
SELECT * FROM sfx_links WHERE target_domain = 'seoffix.com' AND status_code = 200 ORDER BY created_at DESC;
Creating separate indexes on target_domain, status_code, and created_at forces the MySQL query optimizer to perform index merge passes or filesort memory buffers.
A Composite Index on (target_domain, status_code, created_at) allows the engine to locate matching rows in a single B-Tree descent and stream rows pre-sorted with 0 filesort penalty.