Centralized targeting registries are increasingly used to allocate social assistance benefits in developing countries. This paper provides the first attempt to identify the relative importance of two key design issues for targeting accuracy: (i) which households to survey for inclusion in the registry and (ii) how to rank surveyed households. We evaluate Indonesia's Unified Database for Social Protection Programs (UDB), among the largest targeting registries in the world, used to provide social assistance to over 25 million households. Linking administrative data with an independent household survey, we find that the UDB system is more progressive than previous, program-specific targeting approaches. However, simulating an alternative targeting system based on enumerating all households, we find a one-third reduction in undercoverage of the poor compared to focusing on households registered in the UDB. Overall, we identify large gains in targeting performance from improving the initial registration stage relative to the ranking stage.