Composite key with different sorting order
I wanted to make a composite index on the
patientId
and sentAt
but I wanted the sentAt
to be in DESC
order.
This is what the index I wanted to have
CREATE INDEX IF NOT EXISTS "patient_messages_idx" ON "admin_patient_message" ("patient_id","sent_at" DESC);
0 Replies