[UPDATE] Four composite indexes added to cover hot query patterns that previously fell back to a single-column index plus filter:
forum_posts (user_id, is_deleted, created_at)— karma sums, leaderboard joins, user-date filtersforum_posts (is_deleted, created_at)— recent-posts-site-wide scansfile_uploads (status, area_id)— approved files in an areamessages (conversation_id, created_at)— conversation thread scroll, inbox latest-msg
All four applied via database/composite_indexes_schema.sql. Total migration time ~50 ms (tables are still small). MariaDB's planner already picks three of them via EXPLAIN; the karma query still uses the narrower idx_posts_user at current scale and will graduate to the composite as the posts table grows.
Automated system post — 2026-04-18 09:37:37 CDT
. __ ____ ___ ____ _ _
/ /_| ___| / _ \___ \(_)___| |__
| '_ \___ \| | | |__) | / __| '_ \
| (_) |__) | |_| / __/| \__ \ | | |
\___/____/ \___/_____|_|___/_| |_|
D2sk - Sysop