Forum Discussion

tan_thiamhuat's avatar
tan_thiamhuat
Post Patron
8 months ago
Solved

Row-Level Security (RLS) with INLINE or SCHEMABINDING

Row-Level Security (RLS) with INLINE or SCHEMABINDING.. how do we decide whether to use INLINE or SCHEMABINDING?   https://learn.microsoft.com/en-us/fabric/data-warehouse/tutorial-row-level-securit...
  • Ugk161610's avatar
    Ugk161610
    8 months ago

    tan_thiamhuat ,

     

    Yes — the function used for the RLS predicate should be INLINE.
    That’s the expected type of function for RLS because it lets the engine fold the predicate directly into the query plan.

     

    SCHEMABINDING is just an additional option you apply on top of the inline function when you want stability and to prevent accidental schema changes.

     

    So the correct combination is:

    • INLINE TVF → required

    • SCHEMABINDING → recommended/commonly used

     

    Did I answer your question? Mark my post as a solution!

    GopiKrishna