sql integer vs binary_integer vs pls_integer

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql integer vs binary_integer vs pls_integer相关的知识,希望对你有一定的参考价值。

SET TIMING ON

declare
  num   integer := 0;
  incr  integer := 1;
  limit integer := 100000000;
begin
  while num < limit loop
    num := num + incr;
  end loop;
end;
PL/SQL procedure successfully completed.

Elapsed: 00:00:20.23
ex:2
declare
  num   binary_integer := 0;
  incr  binary_integer := 1;
  limit binary_integer := 100000000;
begin
  while num < limit loop
    num := num + incr;
  end loop;
end;
/ 

PL/SQL procedure successfully completed.

Elapsed: 00:00:05.81
ex:3
declare
  num   pls_integer := 0;
  incr  pls_integer := 1;
  limit pls_integer := 100000000;
begin
  while num < limit loop
    num := num + incr;
  end loop;
end;
/ 

以上是关于sql integer vs binary_integer vs pls_integer的主要内容,如果未能解决你的问题,请参考以下文章

Long vs Integer,long vs int,啥时候使用?

java里的 int vs Integer

Java int to String - Integer.toString(i) vs new Integer(i).toString()

vfp9.0连接sql数据库

LongAdder vs Integer in Hash map for frequency map

存储大量资金总额和内存/存储影响 - BigDecimal vs Integer 和最佳实践?