SQL 106 🛢️ Cost-Based Optimizer (CBO) Statistics and Histograms
The cost-based optimizer is the component of a database that decides how to execute a query. It does not guess. It reads statistics about the tables, columns, and indexes involved, estimates how many rows each step of the plan will produce, and assigns a cost to every candidate plan. The plan with the lowest cost…