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

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)

原文地址:https://www.cnblogs.com/weikui/p/11130987.html

时间: 2024-12-15 12:23:24

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的相关文章

MySQL Error Query database. Causejava.sql.SQLException: Incorrect key file for table ‘/tmp/#sql_181c

1,开发人员截图给我,后台报错如下: Error Query database. Causejava.sql.SQLException: Incorrect key file for table '/tmp/#sql_181c_0.MYI'; tryto repair it; 分析,这种,大多数情况是tmp临时表空间不足,所以执行比较复杂的sql或者执行大表关联的时候,需要临时表资源较多,如果临时表资源少的话,就会保错. 2,看看tmp_table_size值 mysql> show varia

启动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. 而是使用SessionFactory.getCurrentSession()方法来获得Session时,当事务结束的时候,不管是提交还是回滚事务,hibernate会自动关闭Session的, 所以不需要手动关闭.

oracle_union_operator

SQL: UNION Operator This SQL tutorial explains how to use the SQL UNION operator with syntax and examples. Description The SQL UNION operator is used to combine the result sets of 2 or more SELECT statements. It removes duplicate rows between the var

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 answer? Get a not-quite-so-short answer? Get a long answer? Do a reverse lookup? Query a different nameserver? Use the search list in /etc/resolv.conf?

SQL Fundamentals:Restricting and Sorting Data限制和排序数据

Restricting and Sorting Data Limit the rows that are retrieved by a query 限制从查询中返回的行 Sort the rows that are retrieved by a query 对查询返回的行进行排序 Use ampersand substitution(&替代变量) to restrict and sort output at runtime 使用替代变量来限制和排序输出 Ampersand 英 [?æmp?sæn

LaTeX排版设置图表的位置 Positioning images and tables

Positioning images and tables LATEX is an editing tool that takes care of the format so you only have to worry about the contents of your document. Nevertheless, sometimes a better control of floating elements is necessary. This article explains how

Hibernate详细教程

一.搭建Hibernate环境 1.在src目录下创建hibernate.cfg.xml配置文件 PS:文件的名字不能改! <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.

How to Resize a Datafile (文档 ID 1029252.6)

APPLIES TO: Oracle Database - Enterprise Edition - Version 9.2.0.1 and laterInformation in this document applies to any platform.Checked for relevance on 17 April 2012 PURPOSE This note will discuss resizing of Oracle datafiles (larger or smaller) SC

solr(二) : 整合ik-analyzer

一. 问题: 在使用solr时, 分词器解析中文的时候, 是一个一个字解析的. 这并不是我们想要的结果. 而在lucene中, 使用的中文分词器是 IKAnalyzer. 那么在solr里面, 是不是任然可以用这个呢. 二. 整合 ik 1. 修改schema配置文件 打开如下路径中的managed-schema.xml文件. 在文档的最后面, 加入 <!--新建 使用 ik 分词器 解析 的域类型, 分词,过滤都在类里面了--> <fieldType name="text_i