-- Performance indexes for orders list view
-- Covers: source filter, status_code filter/sort, ordered_at sort,
-- composite source+status_code for combined filtering
ALTER TABLE orders
    ADD INDEX IF NOT EXISTS orders_source_idx (source),
    ADD INDEX IF NOT EXISTS orders_status_codex (status_code),
    ADD INDEX IF NOT EXISTS orders_ordered_at_idx (ordered_at),
    ADD INDEX IF NOT EXISTS orders_source_status_idx (source, status_code);
