New answers tagged execution-plan
The problem has to be a difference in 2000 engine vs 2008r2 although i havent pinned down exactly what yet. Changed crappy left join in spite of dev not wanting it changed and the infinite clustered index scan looping nonsense quit happening.
The task of an optimizer is to create several execution plans and compare them (typically by costs). Each execution plan can be seen as logical transformation. For example: a simple join would always be the cartesian product of two tables. Each row from the first is read and combined with each row in the other table. Than the join condition is checked and ...
type: index means it's an index scan. That is, it's scanning through an entire index of that table. An index scan often goes along with Using index because the latter indicates that the query is able to use the index to satisfy the query, without touching the rows of the table. Using index would be more clearly labeled Using only index. There are as many ...
Yes. You need the USE PLAN hint. In which you supply the XML from the first plan. SELECT * FROM T OPTION (USE PLAN N'<?xml version="1.0" encoding="utf-16"?> ....') Whilst it doesn't guarantee that the plan will be exactly the same (e.g. compute scalar operators can move around for example) it will likely be pretty close.
Top 50 recent answers are included