Forum Discussion

Ericathomas's avatar
Ericathomas
New Member
6 months ago
Solved

Implementing Region-Level Security

Is it  possible to implement region-level  security while ensuring queries remain fast?  
  • AmitDevkatte's avatar
    6 months ago

    Yes , it is possible to implement. It depends on how you model the data, for example apply the rls on dimregion table instead of facttable so that prunning will happen at early stage. the perfoarmance dependes on how complex dynamic cinditions are, if possible go for static rls if performace is priority.

     

    Hope this will answer your doubt. if you are satisfied with answer please help to mark as solved and give a ๐Ÿ‘ .

    Thanks ๐Ÿ˜€

  • cengizhanarslan's avatar
    6 months ago

    It can stay fast if you model it the โ€œstar-schema + small security tableโ€ way.

     

    • Star schema (one fact, region is a dimension key, not a text filter on the fact)

    • Security table is small (users โ†” regions mapping), not millions of rows

    • Filter flows User โ†’ Security bridge โ†’ Region dimension โ†’ Fact via keys (integers if possible)

    • Avoid complex many-to-many patterns directly into the fact unless absolutely necessary