Create infrastructure for the query optimizer.