Assume that each object in a database has m grades, or scores, one for each o f m attributes. For example, an object can have a color grade, that tells how red it is, and a shape grade, that tells how round it is. For each attribute, there is a sorted list, which lists each object and its grade under that attribute, sorted by grade (highest grade rst). There is some monotone aggregation function, o r combining rule, such as min or average, that combines the individual grades to obtain an overall grade.To determine objects that have the best overall grades, the naive algorithm must access every object in the database, to nd its grade under each attribute. Fagin has given an algorithm (\Fagin's Algorithm", or FA) that is much m o r e e cient. For some distributions on grades, and for some monotone aggregation functions, FA is optimal in a highprobability sense.We analyze an elegant and remarkably simple algorithm (\the threshold algorithm", or TA) that is optimal in a much stronger sense than FA. We show that TA is essentially optimal, not just for some monotone aggregation functions, but for all of them, and not just in a high-probability s e n s e , but over every database. Unlike F A, which requires large bu ers (whose size may grow u n boundedly as the database size grows), TA requires only a small, constant-size bu er.We distinguish two t ypes of access: sorted access (where the middleware system obtains the grade of an object in some sorted list by proceeding through the list sequentially from the top), and random access (where the middleware system requests the grade of object in a list, and obtains it in one step). We consider the scenarios where random A full version of this paper is available on