Extended Statistics

Real data often shows correlations between column values. Because the optimizer does not know these real-world relationships, it will have difficulty estimating the cardinality and may pick sub-optimal execution plans for your queries. For example, it may join tables in an inefficient order or ignore the most efficient index etc.

Let’s create a very simple table to demonstrate how optimizer miscalculates the cardinality when there are correlated columns in WHERE clause: