cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mattkocak
Kudo Commander
Kudo Commander

Does Row-Level Security Always Decrease Performance?

The Row-level security (RLS) guidance in Power BI Desktop article mentions the potential negative performance impacts in reports. Is there only the potential for a negative performance impact, though? Could there also be the potential for a positive performance impact?

 

For example, if there are 10,000 rows in a table, but a user only has access to 1,000, then would Power BI run all of its queries against only those 1,000 rows? Or does it run the queries against the 10,000 rows with additional filters that decrease the performance.

 

The Avoid using RLS section in the article talks about splitting up the model and using different workspaces instead of RLS. Here it states:

 

There are several advantages associated with avoiding RLS:

  • Improved query performance: It can result in improved performance due to fewer filters.

 

This makes me think that the all 10,000 rows in my hypothetical example would be evaluated and thus performance would not improve, but I wanted to reach out and verify this.

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @mattkocak ;

For example, if there are 10,000 rows in a table, but a user only has access to 1,000, Then would Power BI run all of its queries against only those 1,000 rows? Or does it run the queries against the 10,000 rows with additional filters that decrease the performance.

I think it runs the queries against the 10,000 rows with additional filters,

 

For avoiding RLS:
Maybe it refers to two datasets. For example, A dataset of 10 million lines has two roles. Then, only the remaining data of A should be filtered out at the beginning of data import and publish to A workspace. Secondly, filter out B's data and publish it to B's workspace, so that the performance will be better. So only for a small number of characters.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
mattkocak
Kudo Commander
Kudo Commander

Test comment

v-yalanwu-msft
Community Support
Community Support

Hi, @mattkocak ;

For example, if there are 10,000 rows in a table, but a user only has access to 1,000, Then would Power BI run all of its queries against only those 1,000 rows? Or does it run the queries against the 10,000 rows with additional filters that decrease the performance.

I think it runs the queries against the 10,000 rows with additional filters,

 

For avoiding RLS:
Maybe it refers to two datasets. For example, A dataset of 10 million lines has two roles. Then, only the remaining data of A should be filtered out at the beginning of data import and publish to A workspace. Secondly, filter out B's data and publish it to B's workspace, so that the performance will be better. So only for a small number of characters.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors