SELECT * FROM table WHERE from_user=? AND to_user=? ORDER BY created_at DESC
created_at
is a datetime column.
According to my previous question (here), I learned that you don't need to create a descending index.
Is this index ok if I have billions of records? (notice I'm not specifying a desc index for created_at)
>> from_user_id, to_user_id, created_at