[20220708]PLSQL – choosing the BEST data type.txt
[20220708]PLSQL – choosing the BEST data type.txt
--//重複測試:
1.環境:
SCOTT@book> @ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.測試指令碼:
$ cat ppp.txt
create or replace procedure ppp is
x &&1 := 0;
begin
for i in 1 .. 100000000 loop
x := x + 1;
end loop;
end;
/
$ cat ttt.txt
set timing off
@ppp.txt &&1
set timing on
exec ppp
exec ppp
exec ppp
quit
3.測試:
$ echo number pls_integer integer binary_integer simple_integer | tr ' ' '\n' | xargs -IQ bash -c "echo Q Q ;sqlplus -s -l scott/book @ttt.txt Q" | egrep "er|Elapsed"
number number
Elapsed: 00:00:03.88
Elapsed: 00:00:04.36
Elapsed: 00:00:04.35
pls_integer pls_integer
Elapsed: 00:00:01.76
Elapsed: 00:00:01.46
Elapsed: 00:00:01.45
integer integer
Elapsed: 00:00:06.40
Elapsed: 00:00:06.16
Elapsed: 00:00:06.17
binary_integer binary_integer
Elapsed: 00:00:01.48
Elapsed: 00:00:01.42
Elapsed: 00:00:01.43
simple_integer simple_integer
Elapsed: 00:00:01.55
Elapsed: 00:00:01.25
Elapsed: 00:00:01.25
$ echo number pls_integer integer binary_integer simple_integer | tr ' ' '\n' | xargs -IQ bash -c "echo Q Q ;sqlplus -s -l scott/book @ttt.txt Q" | egrep "er|Elapsed"| awk '{print $2}'| paste -d"\t" - - - -
number 00:00:03.68 00:00:03.41 00:00:03.40
pls_integer 00:00:01.75 00:00:01.46 00:00:01.45
integer 00:00:06.81 00:00:06.59 00:00:06.58
binary_integer 00:00:01.73 00:00:01.43 00:00:01.42
simple_integer 00:00:01.49 00:00:01.26 00:00:01.25
--//作者的測試如下:
number pls_integer integer binary_integer simple_integer
1.74 00.57 03.72 00.58 0.56
--//可以看出simple_integer,pls_integer,binary_integer快一些。number,integer最慢。
--//具體說明參考連結
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2906136/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- plsql中資料生成工具data generator的使用SQL
- CF 372D Choosing Subtree is Fun
- Choosing a driver model for developing a USB client driverdevclient
- oracle plsqlOracleSQL
- Time Series Analysis (Best MSE Predictor & Best Linear Predictor)
- The best LeetCode NodesLeetCode
- Best Team With No Conflicts
- plsql use skillsSQL
- PLSQL Developer 14SQLDeveloper
- plsql配置使用SQL
- Best Wishes「兔」You!
- plsql中文亂碼SQL
- windows安裝plsqlWindowsSQL
- PLSQL Developer 行號SQLDeveloper
- PLSQL Developer配置使用SQLDeveloper
- PLSQL程式語言SQL
- 攻防世界-best_rsa
- 25 Best Java Books In 2022Java
- 0710_plsql 函式SQL函式
- 矩陣樹定理 BEST 定理矩陣
- [ARC060F] Best Representation
- 121|Best Time to Buy and Sell Stock
- [leetcode]Best Time to Buy and Sell StockLeetCode
- The Best Way to Export an SVG from SketchExportSVG
- Best Time to Buy and Sell Stock系列
- plsql 除錯 pipelined 函式SQL除錯函式
- plsql developer 視窗的使用SQLDeveloper
- [20180511]PLSQL與fetchsize.txtSQL
- PLSQL Developer 12 註冊碼SQLDeveloper
- 矩陣樹定理與BEST定理矩陣
- Oracle 12.2 RAC on Linux Best Practice DocumentationOracleLinux
- 【貪心】POJ 3617:Best Cow Line
- 121. Best Time to Buy and Sell Stock
- Best Time to Buy and Sell Stock系列分析
- 貪心法-Best Time to Buy and Sell Stock
- plsql developer 15的安裝配置SQLDeveloper
- PLSQL只匯出表結構SQL
- plsql developer工具生成sql monitor reportSQLDeveloper