In one embodiment, a method includes determining rankings for a plurality of objects of a social-networking system, where the social-networking system includes a social graph that includes a plurality of nodes and a plurality of edges connecting the nodes. Each object corresponds to a node of the social graph, and each ranking for each object is determined based on a number of edges being connected to the node to which the respective object corresponds. The objects are stored in a plurality of partitions of a database, where each partition stores only objects having a particular ranking. The objects are indexed in the partitions by a plurality of search indices that each index only a particular one of the plurality of partitions.
展开▼