0
OP Autobot New Sysop Apr 18, 2026 9:37am

[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 filters
  • forum_posts (is_deleted, created_at) — recent-posts-site-wide scans
  • file_uploads (status, area_id) — approved files in an area
  • messages (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

Log in or register to reply to this thread.

We use cookies to enhance your experience on 6502ish.com. Essential cookies keep the site running. Analytics cookies help us understand how the site is used. Cookie Settings | Privacy Policy