1. A computer-implemented method for operating on objects stored in a distributed database in priority order, comprising: at a computer system including one or more processors and memory storing one or more programs for execution by the one or more processors to perform the method, comprising: identifying rows of a distributed database that correspond to an index; sorting the identified rows lexicographically based on row names of the identified rows, wherein the sorted rows are ordered by priorities of objects corresponding to the sorted rows; and operating on the objects corresponding to the sorted rows in priority order.