Is WHERE positioned in a different position in logical query phase
compared to physical query process
In terms of the SQL-server logical query phases; the WHERE clause comes
after the FROM clause.
I've used the following code:
GO
SET showplan_ALL ON;
GO
SELECT j.Name,
q.hoursWorked
FROM #j j
INNER JOIN #q q ON
j.Name = q.Name
WHERE q.hoursWorked > 9;
GO
SET showplan_ALL OFF;
GO
This results in the following:
Now WHERE seems to be part of the nested loop. I thought the nested loop
was the join - which is the FROM clause.
How does this agree with the logical query phases as WHERE seems to be at
the same point as FROM in the physical plan ?
No comments:
Post a Comment