gpt4 book ai didi

performance - DB2 concat与双管道

转载 作者:行者123 更新时间:2023-12-04 13:41:00 27 4
gpt4 key购买 nike

这两个 View 中的哪一个需要更少的CPU?

我目前正在检查某些 View 的句子,并且需要知道如果用双管道替换concat函数,性能是否会有所提高。

create view VIEW1 as
select concat(concat(concat(concat(concat(concat(concat(concat(concat(A, B),C),D),E),F),F),G),H),I) from TABLE

create view VIEW2 as
select A||B||C||D||E||F||G||H||I from TABLE

最佳答案

Information Center:

The CONCAT function is identical to the CONCAT operator. For more information, see With the concatenation operator.



因此,明确的答案是:它们是相同的。但是,IBM确实有这样的说法:

Vertical bars (or the characters that must be used in place of vertical bars in some countries) can cause parsing errors in statements passed from one DBMS to another. The problem occurs if the statement undergoes character conversion with certain combinations of source and target CCSIDs. Thus, CONCAT is the preferable concatenation operator.

关于performance - DB2 concat与双管道,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15231631/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com