1. A computer-implemented method for inserting an object into a distributed database, 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: receiving an object to be inserted into a priority queue, wherein the object includes a unique identifier and a specified priority; generating an index for the object by applying a hashing function to the unique identifier, wherein the index is a shard index; converting the specified priority of the object to a string; generating a row name for the object by combining the index, the string corresponding to the specified priority of the object, and the unique identifier of the object; and inserting the object into a row of the distributed database according to a lexicographic order using the row name; wherein the lexicographical order causes rows for higher priority objects to be inserted before rows for lower priority objects.