1. A method for processing queries, comprising the computer-implemented steps of: a database server receiving a query that evaluates to a relation, wherein said query comprises: a first one or more clauses; and a model clause, wherein said model clause comprises: a rule that comprises a left-side expression and a right-side expression, wherein said right-side expression includes a window function; and one or more dimension columns that correspond to columns of said relation, wherein said left-side expression references a set of said one or more dimension columns; wherein said window function specifies a set of columns over which said window function is to be evaluated, wherein said set of columns corresponds to columns of said relation; said database server executing said query to generate said relation, wherein said database server executing said query comprises: identifying a column vector, wherein said column vector includes only: said set of columns that is specified by said window function, and said set of said one or more dimension columns that is referenced by said left-side expression; and evaluating said window function based on those columns that are included in said column vector; wherein the steps of the method are performed by one or more computer systems.