SQLite Query Planner Selects Suboptimal Index Despite Existing Multi-Column Index
Issue Overview: Suboptimal Join Order and Index Selection in Multi-Table Query with Filtered Scan ID The core challenge involves a SQLite query planner selecting an inefficient execution plan for a four-table join query filtered by file.scan_id. The query joins file, matches, unique_info, and scan tables, with a filter condition on file.scan_id. The database contains millions…