SQL Optimizer calculates the estimated cost for each SQL statement. Statements with high estimated cost use more system and database resources. SQL Optimizer calculates the cost for each step in the execution plan and totals the cost to provide a resource usage estimate for the entire statement. You can use this estimate to identify the most costly step in the execution plan.
Estimated cost can only be used to compare SQL statements that retrieve the exact same result. Comparisons of estimated cost for statements that do not retrieve the same results are not valid.
Important: The cost only provides an estimate of resource usage to execute a SQL statement. Since statements with higher cost may perform better, you should test generated alternatives to determine the best statements for your database environment.