wish back the performance on custom RBAC web reports - fix performance problem on TVF(fn_rbac_R_System_Valid)
I have build many custom RBAC web reports, cince moving to CB massive performance problems appear on this reports.
As part of a man day analysys i noticed that the most of them has a validation join to the TableValuedFunction "fnrbacRSystemValid".
And finaly 6 hours of searching i found the bug that produces this performance Problem in the function named above.
Attached are the orginal and my improved DropAndRecreate.SQL Files.
The following sql query needs - executed with my own UserSIDs - needs more than 5 minutes without, and only 2 secounds with the improvement:
SELECT NetbiosName0 FROM dbo.fnrbacRSystem_Valid(@UserSIDs);