2743711 - Possible Unexpected Results When Using Query With an ORDER BY Clause on a Rowstore Table W...

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)

posted on 2019-07-04 10:45 BASIS/老应 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/weikui/p/11130987.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值