ITPub博客

首页 > 数据库 > Oracle > pls_integer 用法简析

pls_integer 用法简析

原创 Oracle 作者:gholay 时间:2013-12-29 14:04:49 0 删除 编辑
使用场景:简单点说就是在不需要考虑溢出与空的情况下使用,速度会更快,比如计数。
oracle reference :
You can use SIMPLE_INTEGER when the value is never null and overflow checking is unnecessary. Without the overhead of checking for null values and overflow, SIMPLE_INTEGER provides better performance than PLS_INTEGER.


相对于number的优点:简单点说,就是pls_integer 使用的是硬件的算数运算。
oracle reference :
The PLS_INTEGER and BINARY_INTEGER data types are identical and are used interchangeably in this document.
The PLS_INTEGER data type stores signed integers in the range -2,147,483,648 through 2,147,483,647 represented in 32 bits. It has the following advantages over the NUMBER data type and subtypes:
PLS_INTEGER values require less storage.
PLS_INTEGER operations use hardware arithmetic, so they are faster than NUMBER operations, which use library arithmetic.






来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29196873/viewspace-1065384/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-12-28

  • 博文量
    82
  • 访问量
    694144