Cost - based query optimization is a method that uses histograms and row counting to heuristically evaluate the cost of executing a query plan. When you submit a query to SQL Server, it evaluates it and generates a series of Query Plans , for which it uses heuristics to estimate costs. He then selects the cheapest query plan.
Statistics are used by the query optimizer to calculate the cost of query plans. If statistics are missing or out of date, they do not have the correct data to evaluate the plan. In this case, it can generate query plans that are moderately or highly suboptimal.
SQL Server (in most cases) automatically generates statistics for most tables and indexes, but you can add or force updates. The query setup wizard allegedly detected missing statistics or identified associations in the query to which statistics should be added.
ConcernedOfTunbridgeWells Sep 24 '08 at 16:58 2008-09-24 16:58
source share