1. A method of managing statistical views in a database system, the method comprising: collecting data relating to optimization and execution of a workload in the database system, the workload comprising a plurality of sub-expressions; and automatically generating a set of one or more statistical views based on the collected optimization and execution data, each of the one or more statistical views corresponding to one of the plurality of sub-expressions in the workload.