Internal_Function with Encryption in SQL PLAN

简介:
Sometimes,the columns are decrypted as a result and decrypt functions (appears as INTERNAL_FUNCTION in the execution plan) are applied on them, which can lead to poor approximations of column selectivity, leading to improper plans. This happens mostly when the encrypted columns are using SALT to encrypt the data, but it can happen for other reasons as well, including bugs. Bug:7147087 AFTER ENABLING TDE, EXECUTION PLAN CHANGES FOR THE WORSE and it can be recognized from the following symptoms: 1. both tables participating in a join have encrypted columns. 2. there is at least a join condition with encrypted columns at both ends. 3. the second table has an index on the join column(s). 4. the INTERNAL_FUNCTION is applied to the encrypted columns in the join in the second table and the execution plan that used to be an INDEX UNIQUE SCAN on the unenecrypted columns turns into an INDEX RANGE SCAN or FULL TABLE SCAN. Scenario 2: Pushed Predicates The second known TDE performance bug is the one when the queries are using pushed predicates on encrypted columns inside explicit or implicit views and the encrypted column values are decrypted to filter out the values instead of encrypting the pushed predicates. This situation is met when: 1. external predicates are pushed into views 2. the execution plan presents predicate of the form INTERNAL_FUNCTION(column) =  ; On the other hand, INTERNAL_FUNCTION may consume more memory and cpu than normal
 

本文转自maclean_007 51CTO博客,原文链接:
http://blog.51cto.com/maclean/1277485


相关文章
|
监控 C#
【Function App】如果一个拥有多个Function App的Plan遇见了High CPU问题? 如何方便定位是哪一个Function App引发的呢?
在Azure Function App测试中,若多个Function App共用同一App Service Plan资源,当出现High CPU问题时,由于Function App公开指标无法直接观测CPU状态,可通过启用Application Insights解决。其Live Metrics功能可过滤并查看每个Function App的CPU使用情况。具体步骤为:将所有Function App连接至同一Application Insights资源,进入Live Metrics页面按Role筛选监控数据。附有三段C#代码示例,分别展示占用CPU、Memory及普通功能的实现方法。
301 36
|
SQL 数据库
SQL MIN() Function
SQL MIN() Function
123 6
|
SQL JavaScript 前端开发
【Azure 应用服务】Azure JS Function 异步方法中执行SQL查询后,Callback函数中日志无法输出问题
【Azure 应用服务】Azure JS Function 异步方法中执行SQL查询后,Callback函数中日志无法输出问题
228 0
|
SQL 分布式计算 大数据
利用SparkSQL Logical Plan Parse 打造大数据平台SQL诊断利器
利用SparkSQL Logical Plan Parse 打造大数据平台SQL诊断利器
472 0
|
存储 SQL 负载均衡
SQL 函数 function 讲解+代码实例
SQL 函数 function 讲解+代码实例
SQL 函数 function 讲解+代码实例
|
SQL 存储 缓存
Oracle-SQL Explain Plan解读
Oracle-SQL Explain Plan解读
445 0
|
SQL 存储 JSON
使用实践:Fixed Plan加速SQL执行
本文将会介绍在Hologres中如何通过fixed plan加速SQL运行
12039 0
使用实践:Fixed Plan加速SQL执行
|
SQL NoSQL 关系型数据库
MySQL:ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA
MySQL:ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA
1217 0
|
SQL 数据库 索引
Using Python to Connect Function Compute to SQL Server
Normally, a third-party module is required for establishing Python-based database connections. To connect to Microsoft SQL Server, pymssql is required.
13092 0
|
SQL Go 数据库
SQL Server 自定义函数(Function)——参数默认值
原文:SQL Server 自定义函数(Function)——参数默认值 sql server 自定义函数分为三种类型:标量函数(Scalar Function)、内嵌表值函数(Inline Function)、多声明表值函数(Multi-Statement Function) 标量函数:标量函数是对单一值操作,返回单一值。
2213 0
下一篇
开通oss服务