-- 订单列表常用筛选/排序索引 CREATE INDEX IF NOT EXISTS idx_orders_branch_updated_at ON orders (branch_code, updated_at DESC); CREATE INDEX IF NOT EXISTS idx_orders_branch_delivery_date ON orders (branch_code, delivery_date DESC); CREATE INDEX IF NOT EXISTS idx_orders_branch_created_at ON orders (branch_code, created_at DESC); CREATE INDEX IF NOT EXISTS idx_inspections_order_code ON inspections (order_code);