Why does the Execution Plan include a user-defined function call for a computed column that is persisted?
The reason is that the query optimizer does not do a very good job at costing user-defined functions. It decides, in some cases, that it would be cheaper to completely re-evaluate the function for each row, rather than incur the disk reads that might be necessary otherwise. SQL Server’s costing model does not inspect the … Read more