用于最小化行级安全性导致的性能影响的选项 [英] Options to minimize performance impact caused by Row Level Security

查看:111
本文介绍了用于最小化行级安全性导致的性能影响的选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


您好,

Hello,

我们计划在大小为1TB的表中实施行级安全性来控制对记录的访问。我们使用一个函数,安全策略和一个包含用户组列表的查找表来实现这个逻辑。

逻辑似乎工作正常。但是,我们观察到性能损失,因为每次查询返回的每一行为
调用该函数。 

We have plans to implement Row Level Security in a table of size 1TB to control access to records. We are using
a function, security policy and a lookup table with the list of user groups to achieve this logic.
The logic seems to be working fine. However, we are observing a performance hit as the function is being called every time
for every row returned by the query. 

请告知我们是否你们中的任何人都有任何建议/选项来最小化RLS实施所带来的性能影响。

Please let us know if anyone of you have any recommendation/option to minimize the performance impact caused by the implementation of RLS.

SQL Server版本:SQL 2016 - SP2

SQL Server Version : SQL 2016 - SP2

问候

推荐答案

看看 此解决方案

Take a look at  this solution

https://www.mssqltips.com/sqlservertip/4094/phase-out-contextinfo-in-sql-server-2016-with-sessioncontext/

https://www.mssqltips.com/sqlservertip/4094/phase-out-contextinfo-in-sql-server-2016-with-sessioncontext/

https://www.mssqltips.com/sqlservertip/4005/sql-server-2016-row-level-security-limitations-performance-and-troubleshooting/

https://www.mssqltips.com/sqlservertip/4005/sql-server-2016-row-level-security-limitations-performance-and-troubleshooting/


这篇关于用于最小化行级安全性导致的性能影响的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆