There's a query which does something like this:
select * from cars c where c.WheelCount > 0 or CountWheels(c) > 0
Is the function CountWheels
called for every row, or just for those rows where t.Count <= 0
?
The thing is that that function contains logic that should be executed every time -- very likely a bad design; it's part of code of which I have very little control.
This is a simplified example, and I cannot just write select * from cars c where CountWheels(c.Body) > 0
since that would remove some data. Think of it as: give me all cars that ever had wheels, even though some of them may have 0 wheels right now.