[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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Choosing Column Data Type
- Data Guard Switchover and Failover Best PracticesAI
- plsql中資料生成工具data generator的使用SQL
- Choosing Composite IndexesIndex
- Choosing between HttpSession and Stateful session beanHTTPSessionBean
- Choosing a driver model for developing a USB client driverdevclient
- Best Practice in Writing
- Codeforces Round #246 (Div. 2) A. Choosing Teams
- Best Team With No Conflicts
- Mobile Web Best Practices 1.0Web
- The best LeetCode NodesLeetCode
- 【開發篇plsql】plsql遊標SQL
- Codeforces 219D Choosing Capital for Treeland:Tree dpAPI
- 【開發篇plsql】plsql物件型別SQL物件型別
- oracle plsql(二)_plsql塊內之**冪OracleSQL
- The Best Image Ocr SDK For BAT.BAT
- He also has best iphone casesiPhone
- 矩陣樹定理 BEST 定理矩陣
- oracle plsqlOracleSQL
- PLSQL questionsSQL
- plsql tnsnamesSQL
- begin plsqlSQL
- 【開發篇plsql】plsql事務處理SQL
- MATLAB讀取寫入文字資料最佳方法 | Best Method for Loading & Saving Text Data Using MATLABMatlab
- The Best Way to Export an SVG from SketchExportSVG
- Best Time to Buy and Sell Stock系列分析
- css best practice for big team and projectCSSProject
- 80 of the Best Linux Security ApplicationsLinuxAPP
- 矩陣樹定理與BEST定理矩陣
- [ARC060F] Best Representation
- plsql配置使用SQL
- plsql use skillsSQL
- PLSQL Developer 14SQLDeveloper
- oracle plsql例子OracleSQL
- plsql逐行累加SQL
- PLSQL_PROFILESQL
- plsql建立jobSQL
- 【開發篇plsql】plsql資料型別(二) recordSQL資料型別