performance - DB2 concat与双管道

标签 performance db2 double pipe concat

这两个 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/

相关文章:

c - double in decimal 和 floating 的精确值?

performance - 紧挨着放置使用的代码和只读数据是一个好主意吗?

stored-procedures - 如何使用来自 SQuirreL SQL 的 OUT 参数调用 DB2 存储过程?

sql - Sybase sysobjects - DB2 中的等效表是什么?

java - 从文本文件中的每一行获取不同的数据类型

java - 提高 BigDecimal 到双转换的性能

c - 此 C 代码中哪一部分的性能成本最高?

python - 不完整的 gamma 函数 : can this code get any faster in cython, C 或 Fortran?

java - 当 corePoolSize = 0 时,ScheduledExecutorService 消耗 100% CPU

database - 是否有任何 DB2 数据库项目支持 Visual Studio 2010?