"Ansley, Michael" <Michael.Ansley@intec.co.za> writes:
> can't we do something similar to what Oracle does, where you can define your
> optimisation to be rule-based, or stats-based. If it's rule based, the
> optimizer looks only at the schema to decide how to optimize. If
> stats-based, then it has a huge amount of information at its disposal to
> determine how to optimise. However, those stats are compiled by something
> like vacuum.
We pretty much do that already; the "rules" are embodied in the default
cost estimates that get used if there's no statistical data from VACUUM.
regards, tom lane