简体   繁体   English

我们什么时候在 SAP Hana 中有下推代码

[英]When do we have Push down code in SAP Hana

I need an answer or better an explanation between SQL ( Open/Native ), CDS and AMDP .我需要SQL ( Open/Native )、 CDSAMDP之间的答案或更好的解释。
I understand that in order to follow the rules of SAP and push the code down in DB HANA we must use CDS or/and AMDP .我知道为了遵循SAP的规则并在DB HANA下推代码,我们必须使用CDS或/和AMDP I have thought that if we still use only SQL Queries is the old way with which we use the Code in AS.我想如果我们仍然只使用 SQL 查询是我们在 AS 中使用代码的旧方式。 I have read some articles or I have seen some videos in the internet and they have confused me.我读过一些文章或在互联网上看过一些视频,它们让我感到困惑。
Can someone explain me which is the best way for following the PUSH DOWN the CODE in HANA ?有人可以向我解释在HANA遵循 PUSH DOWN CODE 的最佳方法吗?

 - Use of SQL queries Open or Native what it is? 
 - Use of CDS or AMDP are PUSH DOWN CODE technique for Hana.

Thanks谢谢

“Code push down” means that you execute the expensive main part of your computations in the database, not in the application code (= ABAP). “代码下推”意味着您在数据库中执行计算的主要部分,而不是在应用程序代码(= ABAP)中。 How exactly you do that is related only indirectly.你究竟如何做到这一点只是间接相关的。

For example, instead of SELECTing from two database tables and then mixing up rows in the ABAP code, pushing down means you run a JOIN in the database.例如,不是从两个数据库表中选择然后在 ABAP 代码中混合行,向下推意味着您在数据库中运行 JOIN。 This reduces the number of round trips with the database, exploits the columnar characteristics of SAP HANA, and benefits from other code-near-the-data effects, such as reduced amount of data that needs to be transported to the upper layer.这减少了与数据库的往返次数,利用了 SAP HANA 的列特性,并受益于其他代码附近的数据效应,例如减少需要传输到上层的数据量。

Whether you implement that as an OpenSQL query, a classical database view, a CDS view, or inside an AMDP, is not the main question.是将其实现为 OpenSQL 查询、经典数据库视图、CDS 视图还是在 AMDP 中,都不是主要问题。 We found that resorting to simple OpenSQL queries on CDS views is the optimal choice for standard cases.我们发现在 CDS 视图上使用简单的 OpenSQL 查询是标准案例的最佳选择。 When things get more complicated, my answer to this other question may give some more guidance when to use what.当事情变得更复杂时, 我对另一个问题的回答可能会为何时使用什么提供更多指导。

Disclaimer: although I am working for SAP, there are many other opinions on the topic and some may look at this differently, so kindly do not understand this as a reliable official guidance that fits everything.免责声明:虽然我为 SAP 工作,但关于该主题还有许多其他意见,有些人可能对此有不同看法,因此请不要将其理解为适合所有情况的可靠官方指南。

Note that code push down is not a silver bullet that fixes everything.请注意,代码下推并不是解决所有问题的灵丹妙药。 In scenarios with many parallel consumers, pushing down large operations may clog up the database for the other users, such that you need to resort to different patterns, or find ways to limit resource consumption.在有很多并行消费者的场景下,下推大的操作可能会阻塞其他用户的数据库,这样你就需要求助于不同的模式,或者想办法限制资源消耗。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM