Hypothetical Queries in an OLAP Environment

Analysts and decision-makers use what-if analysis to assess the e®ects of hypotheti- cal scenarios. What-if analysis is currently supported by spreadsheets and ad-hoc O L AP tools. Unfortunately, the former lack seam- less integration with the data and the lat- ter lack °exibility and performance appropri- ate for O L AP applications. To tackle these problems we developed the Sesamesystem, which models an hypothetical scenario as a list of hypothetical modications on the ware- house views and fact data. We provide formal scenario syntax and semantics, which extend view update semantics for accomodating the special requirements of O L AP. We focus on query algebra operators suitable for perform- ing spreadsheet-style computations. Then we present Sesame's optimizer and its corner- stone substitution and rewriting mechanisms. Substitution enables lazy evaluation of the hy- pothetical updates. The substitution module delivers orders-of-magnitude optimizations in cooperation withtherewriterthatusesknowl- edge of arithmetic, relational, ¯nancial and other operators. Finally we discuss the chal- lenges that the size of the scenario specica- tionsandthe arbitrarynatureof theoperators pose to the rewriter. We present a rewriter that employs the \minterms" and \packed ¤his work was supportedby the NSF-IRI 9712239 grant, UCSD startup funds, the Onassis Foundation, andequipment donations fromIntel Corp.