Most operations of the relational algebra or SQL - like projection with duplicate elimination, join, ordering, group by and aggregations - are efficiently processed using a sorted stream of tuples. Often these operations are combined with restrictions in one or several attributes. Previous research has proposed algorithms for efficiently dealing with this kind of query pattern, which is highly relevant with respect to both data warehousing, data mining and GIS systems. In this paper we present a cost model that enables a concise estimation of both memory costs and run-time costs for processing queries with restrictions in multiple attributes that may in addition involve a sort operation. Our cost model considers uniformly distributed UB-Trees with independent dimensions and is derived analytically in three steps, starting with a very simple perfectly idealized partitioning scheme, moving on to imperfect partitioning schemes and finally evaluating a probabilistically partitioned UB-Tre...