I have two queries that are identical. For tuning purposes, I created two indexes that are slightly different and used index hints on each query so that each one uses a specified index. After I ran the identical queries, I looked at each query's execution plan. Query 1 was responsible for 26 percent of the batch cost, while Query 2 was responsible for 74 percent. However, Query 2 ran faster than Query 1. Query 1 cost 7.19, and Query 2 cost 19.9. Query 1 (the lower-cost query) took 3 seconds to run, and Query 2 executed in 2 seconds. Something doesn't seem right about the cost estimates that the query processor provided. Can you explain what's going on?
...