Muhammad Al Pasha Commented 3 Years ago through
Puzzles | 1 Point
In my opinion the expression:
SUBSTRING(p.permlist,t.n+1, CHARINDEX(',',p.permlist,t.n+1)-t.n-1) permelement
caused the problem, and the the reason behind this is that the optimizer decided to evaluate the join condition:
p.permelement=d.elemid