Cost is some measure of the resources required to execute the query and/or the time the user will wait before the results of the query are available. Note that plans have physical properties, but expressions (either logical or physical) and groups do not have physical properties -- and therefore do not have costs. This is because only a plan corresponds to a fully specified algorithm that can be "costed".

           The cost of a plan will depend on several factors. First, it will depend on the order that the operations are performed and the order of the operands (inputs) to a particular operator. It will also depend on the access paths and particular algorithms (physical operators) used to perform the operations.


Item Operators

           In addition to logical and physical operators, the Cascades Framework has item operators. Item operators are distinguished from bulk operators (the logical and physical operators) in that they operate on a fixed number (usually one) of tuples, while bulk operators operate on an arbitrary number of tuples. In the relational context, item operators are frequently functions of a single tuple (as opposed to functions of an entire relation). Expressions in which the operator is an item operator are called item expressions.

           In Model D, item operators are used primarily as predicates or as the building blocks of predicates. Predicates are functions that return a boolean. Item operators are used, for example, as predicates for the SELECT logical operator.

           More generally, item operators can be thought of as functions either of a fixed number of tuples, or of a fixed number of (atomic) values. They can return a boolean, an attribute of a relation (scaler value of one of the base types (int, double, string, etc)) or, in one case, CONST_SET_OP, a set of scalers.

           Examples of item operators are attribute operators (which retrieve a value from a single tuple), comparison operators (which compare two values), boolean operators (functions of two boolean values) and constant operators (functions with no arguments).

3. Fundamental Concepts:    <Models> <Log> <Query Trees> <Groups> <Memo> <Phys> <Item> <Rules> <Opt Stages> <Find Best> <Complexity>
  3.1: EQJOIN     3.2a: Query Tree     3.2b: Equiv.     3.3a: Init Memo     3.3b: Memo     3.3c: Key     3.4: Complexity     3.5: Phys Memo     3.6: Plan     3.7: Pred.     3.8: Op Types     3.9: Rule  

 Page 21