2743711 - Possible Unexpected Results When Using Query With an ORDER BY Clause on a Rowstore Table With a Parallelized Search on a Cpbtree-Type Index
Version 14 from May 28, 2019 in English
Show Changes
Symptom
A query on a rowstore table containing an ORDER BY clause can potentially lead to unexpected results in situations where the query is internally executed in a way that a search on a cpbtree-typed index is performed in a parallelized manner.
Other Terms
SAPHANA, HANA, wrong result, NO_INDEX_SEARCH, SELECT FROM
Reason and Prerequisites
Reason:
Due to a programming error in SAP HANA, the parallel execution might be handled incorrectly, which can potentially lead to unexpected results.
Affected Releases:
SAP HANA 1:
Revision = 122.21 (SPS12)
SAP HANA 2:
Revision = 024.07 (SPS02)
Revisions 034.00 and 035.00 (SPS03)
Prerequisites:
All of the following conditions need to be met:
A query is executed on a rowstore table with a cpbtree-typed index
The query is parallelized
An ORDER BY clause is used
To check how many cpbtree-typed indexes exist for a specific table, you can execute the following command:
SELECT count(*) FROM INDEXES WHERE SCHEMA_NAME = AND TABLE_NAME =
and INDEX_TYPE LIKE '%CPBTREE%'
To check if the query execution involved a parallelized search on a cpbtree-typed index, you can:
Create a PlanViz for the query, e.g. as described in SAP Note 2073964
In the PlanViz, search for nodes containing Cpbtree in their name
If you find any, check if their parent node owns multiple nodes with cpbtree in their name
This issue is not restricted to either SAP applications or custom code - both can be affected, as soon as the above conditions are met.
Solution
Apply one of the following SAP HANA revisions:
SAP HANA 1:
Revisions >= 122.22 (SPS12)
SAP HANA 2:
Revisions >= 024.08 (SPS02)
Revisions >= 036.00 (SPS03)
or higher
or higher
Workaround:
As a workaround you can use one of the following:
Add hint NO_INDEX_SEARCH to the query:
To pin the SQL Plan of the statement with the hint, see SAP Note 2222321 for details.
To configure a statement hint for the query, see SAP Note 2400006 for details.
You can disable the parallel execution of row engine globally using the following SQL statement:
ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM' ) SET ('row_engine', 'parallel_query_execution') = 'false' WITH RECONFIGURE;
Please note that this can have severe performance impact on the whole system. You can revert the setting using the following SQL statement:
ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM' ) UNSET ('row_engine', 'parallel_query_execution') WITH RECONFIGURE;
Disclaimer
The SAP HANA configuration parameter [row_engine] parallel_query_execution is an internal parameter and may only be used in the context of this SAP Note. Using such a parameter requires that the SAP HANA system has the revision specified in the SAP Note, the described error situation has occurred. Using internal parameters outside of this given scope is not supported.
Software Components
Software Component From To And Subsequent
HDB 1.00 1.00
HDB 2.00 2.00
Support Package Patches
Software Component Support Package Patch Level Download
SAP HANA DATABASE 1.00 SP122 000022
SAP HANA DATABASE 2.0 SP024 000008
SAP HANA DATABASE 2.0 SP036 000000
References
This document refers to
Number Title
2400006 FAQ: SAP HANA Statement Hints
2222321 How-To: Pinning SAP HANA SQL Plans
2073964 Create & Export PlanViz in HANA Studio
2628684 Known issues detected in SAP HANA 2 SPS03
2525424 Known issues detected in SAP HANA 2 SPS02
2380229 SAP HANA Platform 2.0 - Central Note
2325090 Known issues detected in SAP HANA 1 SPS12
1514967 SAP HANA: Central Note
This document is referenced by
Number Title
2142945 FAQ: SAP HANA Hints
2222121 SAP HANA Wrong Result Sets
2655761 SAP S/4HANA - restrictions and recommendations regarding specific revisions of SAP HANA database for use in SAP S/4HANA
2735060 SAP HANA 2.0 SPS 03 Database Revision 036
2746759 SAP HANA 2.0 SPS 03 Database Revision 037
2728470 SAP HANA 2.0 SPS 02 Database Maintenance Revision 024.08
Languages
日本語 (Machine Translation)
Português (Machine Translation)
- 启动PL/SQL Developer 报字符编码不一致错误 Database character set (AL32UTF8) and Client character set (ZHS16GBK) are different. Character set conversion may cause unexpected results. Note: you can set the client
今天写hibernate时候遇到一些异常 代码: 出现异常情况: 出现以上原因是Session关闭 如果不是使用的SessionFactory.getSession()来获得Session. 而是使用 ...
- oracle_union_operator
SQL: UNION Operator This SQL tutorial explains how to use the SQL UNION operator with syntax and exa ...
- DiG HOWTO How to use dig to query DNS name servers.
Contents Introduction Understanding the default output What can I discover? How do I … Get a short a ...
- Inside TSQL Querying - Chapter 1. Logical Query Processing
Logical Query Processing Phases Summary (8) SELECT (9) DISTINCT (11) <TOP_specification> <s ...
- SQL Fundamentals:Restricting and Sorting Data限制和排序数据(FROM-WHERE-SELECT-ORDER BY)
SQL Fundamentals || Oracle SQL语言 控制操作的显示列:基本的SELECT语句 控制行:限定查询和排序显示 分组统计查询 限定查询:WHERE字句 排序显示:ORDER B ...
- LaTeX排版设置图表的位置 Positioning images and tables
Positioning images and tables LATEX is an editing tool that takes care of the format so you only hav ...
- What is the bitmap index?
示例执行计划: postgres ; QUERY PLAN ---------------------------------------------------------------------- ...
- Solr搭建大数据查询平台
参考文章:http://www.freebuf.com/articles/database/100423.html 对上面链接的补充: solr-5.5.0版本已被删除,新url:http://mir ...
- 6.Type and Member Basics
1.The Different Kinds of Type Members 1.Constants:a symbol that identifies a never-changing data val ...
随机推荐
- 十、collection的作用+变量
一.collection作用?容器 组织业务逻辑 导入导出 其他功能,比如监控和mock server 二.为什么要使用变量 假设我们需要测试n个api,这些api的domain都是相同的,比如 ap ...
- netty5拆包问题解决实例
基于之前的例子(参见netty5自定义私有协议实例),我们修改下客户端handler,让发送的数据超过1024字节: NettyClientHandler: /** * 构造PCM请求消息体 * * ...
- 论H5嵌入APP的联合登录的解决方案
什么是联合登录 因为公司产品的发展,会与第三方的一些商户进行对接,商户APP提供入口,进入我们的H5页,从而提供服务. 而商户希望用户在其APP进行账户登录后,进入H5页不再进行登录,所以我们的H5需 ...
- LODOP统计table自动分页后的每页的某列合计值
LODOP中超文本会根据打印项高度或超过纸张,自动分页.(相关博文:Lodop打印控件 超文本自动分页.LODOP中ADD_PRINT_TABLE.HTM.HTML表格自动分页测试.Lodop打印表格 ...
- VSIX 插件
https://blog.csdn.net/lynchee/article/details/83065608
- [计算机视觉][ARM-Linux开发] Ubuntu14.04安装OpenCV3.2中遇到的问题的解决方案
2. ubuntu下,opencv3.x安装一直downloading这个包,要看超时信息里的下载路径,把它放到下载路径中,比如我的opencv3.2.0源文件路径为/home/han/softwar ...
- 【C/C++开发】malloc,calloc和realloc的区别和注意事项
(1)C语言跟内存分配方式 <1>从静态存储区域分配. 内存在程序编译的时候就已经分配好,这块内存在程序的整个运行期间都存在.例如全局变量.static变量. <2&g ...
- 最新 企叮咚java校招面经 (含整理过的面试题大全)
从6月到10月,经过4个月努力和坚持,自己有幸拿到了网易雷火.京东.去哪儿. 企叮咚等10家互联网公司的校招Offer,因为某些自身原因最终选择了 企叮咚.6.7月主要是做系统复习.项目复盘.Leet ...
- 022 Android .9图片的含义及制作教程
1.图片(.9.png格式)的概念 (1)9patch图片是andriod app开发里一种特殊的图片形式,文件的扩展名为:.9.png (2)9patch图片的作用就是在图片拉伸的时候保证其不会失真 ...
- java当中JDBC当中请给出一个SQLServer DataSource and SingleTon例子
[学习笔记] 5.SQLServer DataSource and SingleTon: import net.sourceforge.jtds.jdbcx.*;import java.sql.*;i ...