Successful Payments by Order
Reconciliation searches payments for rows with status = 'success' for a specific order_id. Add an index that supports both fields: status first, then order number.
Speed this query up with an index
CREATE INDEX ix_payments_status_order ON payments (status, order_id)
Doar CREATE/ALTER/DROP — nu este nevoie de un SELECT la final.
Conectează-te pentru a vedea istoricul soluțiilor trimise
Conectează-teConectează-te pentru a folosi Mentorul AI
Conectează-te