How histograms impact CBO optimizer in Determining Execution Plan?
Next, it is time to know how histograms impact the selection of execution plan of SQL statement. In Oracle, the cost-based optimizer (CBO) can use histograms to get accurate estimates of the distribution of column data. A histogram partitions the values in the column into bands, so that all column values in a band fall within the same range. Histograms provided improved selectivity estimates in the presence of data skew, resulting in optimal plans with non-uniform data distributions. In turn, histograms are used to predict cardinality and the number of rows returned to a query. And, cardinality of values of individual table column is also a key measure to define which index mechanism benefit oracle database performance. In mathematics, the cardinality of a set is a measure of the “number of elements of the set”. In Oracle, columns of tables with very few unique values, which are called low cardinality, are good candidates of bitmap indexes, other than B-tree index with which we are mos