Newest Paid Orders First
The report reads rows from orders with status = 'paid' and shows newest created_at values first. Add a composite index on status and created_at, accounting for reverse date order.
Speed this query up with an index
CREATE INDEX ix_orders_status_created ON orders (status, created_at DESC)
Just CREATE/ALTER/DROP — no trailing SELECT needed.
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in