Improved performance of cardinality queries.