[Tom Lane - Wed at 04:33:54PM -0400] > > 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. Ah; that's understandable - the planner have two options, to do a index traversion without any extra sorting, or to take out everything and then sort. What I'd like postgres to do is to traverse the index and do some sorting for every unique value of created. Maybe such a feature can be found in future releases - like Postgres 56.3? ;-)