Tobias Brox <tobias@xxxxxxxxxxxxx> writes: > NBET=> explain select * from account_transaction where users_id=123456 order by created desc, id desc limit 10; > We have indices on the users_id field and the (users_id, created)-tuple. Neither of those indexes can provide the sort order the query is asking for. regards, tom lane