mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-03-24 08:37:30 +01:00
Entire-Session: c31c699a-f492-48f7-bcf0-35d3ceeac243 Entire-Strategy: manual-commit Entire-Agent: Claude Code Ephemeral-branch: entire/eba3995-e3b0c4
558 B
558 B
Session Context
User Prompts
Prompt 1
Implement the following plan:
Optimize Job Table Indexes for 20M Row Production Database
Context
The job table has 79 indexes (created in migrations 08/09), causing:
- Wrong index selection — without
ANALYZEstatistics, SQLite picks wrong indexes (e.g.,jobs_jobstate_energyinstead ofjobs_starttimefor ORDER BY queries), causing full-table temp B-tree sorts on 20M rows → timeouts - Excessive disk/memory overhead — each index costs ~200-400MB at 20M rows; 79 inde...