SlideShare a Scribd company logo
1 of 30
Download to read offline
追求JDBC on Oracle最佳性能?如何才好? 
Maclean Liu
古希腊的Delphi(世界中心),屹立着Parnassus Mount(诗檀山),山上有一座阿波罗神庙,庙中住着 女祭司(Oracle)
兴一利 不如 除一害
Jdbc性能案例1:问题 
for (i = 0; i < 1000000; i++) { conn = ds.getConnection(userid, password); pstmt = conn.prepareStatement("SELECT name FROM employees WHERE id = " + i); rset = pstmt.executeQuery(); 
...... conn.close(); } 
循环内获得connection 并解 析执行,connection、非缓 存的解析在Oracle中都很昂 贵
Jdbc性能案例1:结果 
• 响应时间: 150ms 
• 吞吐量: 300tps 
•CPU方面Sys和User都很高
Jdbc1性能案例1:对策 
conn = ds.getConnection(userid, password); for (i = 0; i < 1000000; i++) { pstmt = conn.prepareStatement("SELECT name FROM employees WHERE id = " + i); rset = pstmt.executeQuery(); 
...... } 
conn.close(); 
只建立必要的connection到 数据库
Jdbc1性能案例1:改良后 
•响应时间: 20ms 
•吞吐量: 3,000tps 
•latch: shared pool 
此时的瓶颈凸显在解析(parse)并发争用上
Jdbc性能案例1:原因 
conn = ds.getConnection(userid, password); for (i = 0; i < 1000000; i++) { { pstmt = conn.prepareStatement("SELECT name FROM employees WHERE id = " + i); rset = pstmt.executeQuery(); 
...... } 
conn.close(); 
每次执行都使用拼凑的SQL 语句,未启用绑定变量,默 认情况下每次均硬解析hard parse
Jdbc性能案例1:进一步对策 
conn = ds.getConnection(userid, password); for (i = 0; i < 1000000; i++) { { pstmt = conn.prepareStatement("SELECT name FROM employees WHERE id = ?"); pstmt.setInt(1, i); rset = pstmt.executeQuery(); 
...... } 
conn.close(); 
使用绑定变量,避免每次执 行都硬解析
Jdbc1性能案例1:再改良后 
•响应时间: 1ms 
•吞吐量: 25,000tps 
•并发争用减少 
•CPU被充分使用
Jdbc1性能案例1:正确使用PrepareStatement 
•PrepareStatement 
–SQL语句解析 
•Bind 
–变量绑定 
•Execute 
–SQL语句执行 
× 
For { 
PrepareStatement 
Bind 
Execute 
} 
○ 
PrepareStatement 
For { 
Bind 
Execute 
}
Jdbc1性能案例1:进一步对策 
conn = ds.getConnection(userid, password); pstmt = conn.prepareStatement("SELECT name FROM employees WHERE id = ?"); for (i = 0; i < 1000000; i++) { { pstmt.setInt(1, i); rset = pstmt.executeQuery(); 
...... } 
conn.close(); 
预解析,只解析一次 
For prepareStatement , http://www.oracle.com/technetwork/testcontent/jdbc- ch5-131209.pdf
Jdbc1性能案例1:再再改良后 
•响应时间: 1ms 
•吞吐量: 34,000tps 
•吞吐量进一步提高
Jdbc1性能案例1:再改良后
Jdbc1性能案例2:永远不够的open_cursor 
•ORA-1000报错” maximum open cursors exceeded”达到session 最大游标数 
•故障发生业务停滞 
•大量SQL*Net break/reset to client等待事件 
•OPEN_CURSOR参数已经很大了,都到 10000了,开发人员要求DBA进一步加大该 参数到30000
Jdbc1性能案例2:原因 
try { ...... rset = pstmt.executeQuery(); ...... rset.close(); pstmt.close(); } catch (SQLException e) { e.printStackTrace(); } 
代码里是写了关闭游标,但 存在还没执行就跑到异常处 理里去的可能。
Jdbc1性能案例2:对策 
try { ...... rset = pstmt.executeQuery(); ...... rset.close(); } catch (SQLException e) { e.printStackTrace(); } finally { if (pstmt != null) try {pstmt.close();} catch (SQLException e) {...} } 
Finally中调用关闭游标, TRY块结束后总会执行
Jdbc1性能案例3:永远不够的processes 
•吞吐量接近于零 
•负载也接近于零 
•CPU使用率也接近于零 
•告警日志中出现ORA-00020错误? 
•吞吐量暴跌,应用会话无法连接数据库?开发 人员要求DBA进一步加到processes参数?
Jdbc1性能案例3:原因 
try { ...... rset = pstmt.executeQuery(); ...... rset.close(); pstmt.close(); conn.close(); } catch (SQLException e) { e.printStackTrace(); } 
代码里是写了关闭 connection,但存在还没执 行就跑到异常处理里去的可 能。
Jdbc1性能案例3:对策 
try { ...... rset = pstmt.executeQuery(); ...... rset.close(); } catch (SQLException e) { e.printStackTrace(); } finally { if (pstmt != null) try {pstmt.close();} catch (SQLException e) {...} if (conn != null) try {conn.close();} catch (SQLException e) {...} 
} 
Finally中调用关闭connection, TRY块结束后总会执行
Jdbc1性能案例4 
•莫名出现大量锁等待 
•没有任何告警,但所有应用全部超时? 
•大量session处于锁等待挂起状态 
•开发人员要求DBA去kill锁数据的session?
Jdbc1性能案例4:原因 
try { ...... rset = pstmt.executeUpdate(); ...... conn.commit(); pstmt.close(); conn.close(); } catch (SQLException e) { e.printStackTrace(); 
} 
代码中写了commit,但没考 虑异常处理 
可能的session leak
Jdbc1性能案例4:对策 
try { ...... rset = pstmt.executUpdate(); ...... conn.commit(); } catch (SQLException e) { if (conn != null ) try {conn.rollback();} catch (SQLException e) {...} e.printStackTrace(); } finally { if (pstmt != null) try {pstmt.close();} catch (SQLException e) {...} if (conn != null) try {conn.close();} catch (SQLException e) {...} } 
当出现异常就rollback释放锁
Other tips:Set AutoCommit Off 
关闭自动commit,在应用真正需要的时候commit, 
即维护了必要的事务又减少了log file sync等待 
Connection.setAutoCommit(false);
Other tips:批量Insert 
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); 
Connection conn = DriverManager.getConnection ("jdbc:oracle:oci8:@","scott","tiger"); 
PreparedStatement ps = conn.prepareStatement ("insert into dept values (?, ?,?)"); 
//Change batch size for this statement to 3 
((OraclePreparedStatement)ps).setExecuteBatch (3); 
ps.setInt (1, 23); 
ps.setString (2, "Sales"); 
ps.setString (3, "USA"); 
ps.executeUpdate (); //JDBC queues this for later execution 
ps.setInt (1, 24); 
ps.setString (2, "Blue Sky"); 
ps.setString (3, "Montana"); 
ps.executeUpdate (); //JDBC queues this for later execution 
ps.setInt (1, 25); 
ps.setString (2, "Applications"); 
ps.setString (3, "India"); 
ps.executeUpdate (); //The queue size equals the batch value of 3 
//JDBC sends the requests to the 
// database 
ps.setInt (1, 26); 
ps.setString (2, "HR"); 
ps.setString (3, "Mongolia"); 
ps.executeUpdate (); //JDBC queues this for later execution 
((OraclePreparedStatement)ps).sendBatch (); 
//JDBC sends the queued request 
…………………..
Other tips:Prefetch Rows 
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); 
Connection conn = DriverManager.getConnection 
("jdbc:oracle:oci8:@","scott","tiger"); 
//Set the default row prefetch setting for this connection 
((OracleConnection)conn).setDefaultRowPrefetch (7); 
/* The following statement gets the default row prefetch value for 
the connection, that is, 7. 
*/ 
Statement stmt = conn.createStatement (); 
/* Subsequent statements look the same, regardless of the row 
prefetch value. Only execution time changes. 
*/ 
ResultSet rset = stmt.executeQuery ("select ename from emp"); 
System.out.println ( rset.next () ); 
while( rset.next () ) 
System.out.println ( rset.getString (1) ); 
//Override the default row prefetch setting for this statement 
( (OracleStatement)stmt ).setRowPrefetch (2); 
rset = stmt.executeQuery ("select ename from emp"); 
System.out.println ( rset.next () ); 
while( rset.next () ) 
System.out.println ( rset.getString (1) );
Oracle Database 11g R2 JDBC BasicFiles LOB Pre-Fetch 
setLobPrefetchsize() 
select 
name, bio 
from 
LOB_tab 
1.Parse 
2.Execute 
3.Fetch metadata 
4.Fetch LOB data 
Faster Lob Data Fetching by performing 
all operations on server in a single 
single roundtrip
Oracle Database 11g R2 Zero-Copy SecureFiles LOB 
setupSecureFile() 
Blob.getBytes() 
1.Fetch LOB data 
(bypass internal buffer) 
Faster SecureFiles operations by bypassing server-side buffer copy
JDBC Lob Pre-Fetch Performance 
Performance benchmark fetches CLOBs of sizes 1K to 50K with PREFETCH enabled and PREFETCH disabled, 
against BASICFILE LOBs and SECUREFILE LOBs.
Thank You 
www.parnassusdata.com 
400-690-3643

More Related Content

What's hot

Java synchronizers
Java synchronizersJava synchronizers
Java synchronizersts_v_murthy
 
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudyスローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudyYusuke Yamamoto
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoinknight1128
 
Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능knight1128
 
Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)martincabrera
 
夜子まま塾講義3(androidで電卓アプリを作る)
夜子まま塾講義3(androidで電卓アプリを作る)夜子まま塾講義3(androidで電卓アプリを作る)
夜子まま塾講義3(androidで電卓アプリを作る)Masafumi Terazono
 
JBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineJBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineAnil Allewar
 
No SQL Unit - Devoxx 2012
No SQL Unit - Devoxx 2012No SQL Unit - Devoxx 2012
No SQL Unit - Devoxx 2012Alex Soto
 
Tracing Parallel Execution (UKOUG 2006)
Tracing Parallel Execution (UKOUG 2006)Tracing Parallel Execution (UKOUG 2006)
Tracing Parallel Execution (UKOUG 2006)Doug Burns
 
State of entity framework
State of entity frameworkState of entity framework
State of entity frameworkDavid Paquette
 
Learning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APILearning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APIcaswenson
 
Introduction to Drools
Introduction to DroolsIntroduction to Drools
Introduction to Droolsgiurca
 
생산적인 개발을 위한 지속적인 테스트
생산적인 개발을 위한 지속적인 테스트생산적인 개발을 위한 지속적인 테스트
생산적인 개발을 위한 지속적인 테스트기룡 남
 

What's hot (19)

Java synchronizers
Java synchronizersJava synchronizers
Java synchronizers
 
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudyスローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
 
Jdbc
JdbcJdbc
Jdbc
 
Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능
 
Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)Rules Engine - java(Drools) & ruby(ruleby)
Rules Engine - java(Drools) & ruby(ruleby)
 
夜子まま塾講義3(androidで電卓アプリを作る)
夜子まま塾講義3(androidで電卓アプリを作る)夜子まま塾講義3(androidで電卓アプリを作る)
夜子まま塾講義3(androidで電卓アプリを作る)
 
Drools Ecosystem
Drools EcosystemDrools Ecosystem
Drools Ecosystem
 
京都Gtugコンパチapi
京都Gtugコンパチapi京都Gtugコンパチapi
京都Gtugコンパチapi
 
JBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineJBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule Engine
 
Custom faultpolicies
Custom faultpoliciesCustom faultpolicies
Custom faultpolicies
 
No SQL Unit - Devoxx 2012
No SQL Unit - Devoxx 2012No SQL Unit - Devoxx 2012
No SQL Unit - Devoxx 2012
 
Grails Transactions
Grails TransactionsGrails Transactions
Grails Transactions
 
Tracing Parallel Execution (UKOUG 2006)
Tracing Parallel Execution (UKOUG 2006)Tracing Parallel Execution (UKOUG 2006)
Tracing Parallel Execution (UKOUG 2006)
 
Qt Network Explained (Portuguese)
Qt Network Explained (Portuguese)Qt Network Explained (Portuguese)
Qt Network Explained (Portuguese)
 
State of entity framework
State of entity frameworkState of entity framework
State of entity framework
 
Learning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APILearning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security API
 
Introduction to Drools
Introduction to DroolsIntroduction to Drools
Introduction to Drools
 
생산적인 개발을 위한 지속적인 테스트
생산적인 개발을 위한 지속적인 테스트생산적인 개발을 위한 지속적인 테스트
생산적인 개발을 위한 지속적인 테스트
 

Viewers also liked

Reading your textbook
Reading your textbookReading your textbook
Reading your textbookSonja Franeta
 
Mysql企业备份发展及实践
Mysql企业备份发展及实践Mysql企业备份发展及实践
Mysql企业备份发展及实践maclean liu
 
【诗檀软件】Mysql高可用方案
【诗檀软件】Mysql高可用方案【诗檀软件】Mysql高可用方案
【诗檀软件】Mysql高可用方案maclean liu
 
配置Golden gate同步ddl语句
配置Golden gate同步ddl语句配置Golden gate同步ddl语句
配置Golden gate同步ddl语句maclean liu
 
03. a. salinan permendikbud no. 65 th 2013 ttg standar proses
03. a. salinan permendikbud no. 65 th 2013 ttg standar proses03. a. salinan permendikbud no. 65 th 2013 ttg standar proses
03. a. salinan permendikbud no. 65 th 2013 ttg standar prosesIrma Muthiara Sari
 
Wordpress Plugin Recommendations
Wordpress Plugin RecommendationsWordpress Plugin Recommendations
Wordpress Plugin Recommendationslewis887
 
Oracle prm数据库恢复工具与asm
Oracle prm数据库恢复工具与asmOracle prm数据库恢复工具与asm
Oracle prm数据库恢复工具与asmmaclean liu
 
Permen tahun2013 nomor81a_lampiran5
Permen tahun2013 nomor81a_lampiran5Permen tahun2013 nomor81a_lampiran5
Permen tahun2013 nomor81a_lampiran5Irma Muthiara Sari
 
Myeloma conference presentation november 2012
Myeloma conference presentation   november 2012Myeloma conference presentation   november 2012
Myeloma conference presentation november 2012Jason Potts
 
The bee swarm model of social change: How do institutions and grassroots push...
The bee swarm model of social change: How do institutions and grassroots push...The bee swarm model of social change: How do institutions and grassroots push...
The bee swarm model of social change: How do institutions and grassroots push...Steve Zavestoski
 
11 Tips for 2011: Making Social Media Marketing Work Smarter For You
11 Tips for 2011: Making Social Media Marketing Work Smarter  For You11 Tips for 2011: Making Social Media Marketing Work Smarter  For You
11 Tips for 2011: Making Social Media Marketing Work Smarter For YouNamrita Sehgal
 
Puntuaciones provisionales (martes 25 a las 12h)
Puntuaciones provisionales (martes 25 a las 12h)Puntuaciones provisionales (martes 25 a las 12h)
Puntuaciones provisionales (martes 25 a las 12h)Emi Voces
 
Introduction: Jukka Huhtamäki | Dagstuhl 16141
Introduction: Jukka Huhtamäki | Dagstuhl 16141Introduction: Jukka Huhtamäki | Dagstuhl 16141
Introduction: Jukka Huhtamäki | Dagstuhl 16141Jukka Huhtamäki
 
Overwhelming Numbers
Overwhelming NumbersOverwhelming Numbers
Overwhelming Numbersredskelington
 
Puntuaciones provisionales (martes 25 a las 12h)
Puntuaciones provisionales (martes 25 a las 12h)Puntuaciones provisionales (martes 25 a las 12h)
Puntuaciones provisionales (martes 25 a las 12h)Emi Voces
 
09. permendikbud nomor 71 tahun 2013 ttg buku teks pelajaran layak
09. permendikbud nomor 71 tahun 2013 ttg buku teks pelajaran layak09. permendikbud nomor 71 tahun 2013 ttg buku teks pelajaran layak
09. permendikbud nomor 71 tahun 2013 ttg buku teks pelajaran layakIrma Muthiara Sari
 
マイナンバーセミナー補足資料
マイナンバーセミナー補足資料マイナンバーセミナー補足資料
マイナンバーセミナー補足資料Takeshita Kouhei
 
Oracle prm安装说明
Oracle prm安装说明Oracle prm安装说明
Oracle prm安装说明maclean liu
 
Fluids &amp; Electrolytes
Fluids &amp; ElectrolytesFluids &amp; Electrolytes
Fluids &amp; Electrolytesekhlashosny
 

Viewers also liked (20)

Reading your textbook
Reading your textbookReading your textbook
Reading your textbook
 
Mysql企业备份发展及实践
Mysql企业备份发展及实践Mysql企业备份发展及实践
Mysql企业备份发展及实践
 
【诗檀软件】Mysql高可用方案
【诗檀软件】Mysql高可用方案【诗檀软件】Mysql高可用方案
【诗檀软件】Mysql高可用方案
 
配置Golden gate同步ddl语句
配置Golden gate同步ddl语句配置Golden gate同步ddl语句
配置Golden gate同步ddl语句
 
03. a. salinan permendikbud no. 65 th 2013 ttg standar proses
03. a. salinan permendikbud no. 65 th 2013 ttg standar proses03. a. salinan permendikbud no. 65 th 2013 ttg standar proses
03. a. salinan permendikbud no. 65 th 2013 ttg standar proses
 
Wordpress Plugin Recommendations
Wordpress Plugin RecommendationsWordpress Plugin Recommendations
Wordpress Plugin Recommendations
 
20091016
2009101620091016
20091016
 
Oracle prm数据库恢复工具与asm
Oracle prm数据库恢复工具与asmOracle prm数据库恢复工具与asm
Oracle prm数据库恢复工具与asm
 
Permen tahun2013 nomor81a_lampiran5
Permen tahun2013 nomor81a_lampiran5Permen tahun2013 nomor81a_lampiran5
Permen tahun2013 nomor81a_lampiran5
 
Myeloma conference presentation november 2012
Myeloma conference presentation   november 2012Myeloma conference presentation   november 2012
Myeloma conference presentation november 2012
 
The bee swarm model of social change: How do institutions and grassroots push...
The bee swarm model of social change: How do institutions and grassroots push...The bee swarm model of social change: How do institutions and grassroots push...
The bee swarm model of social change: How do institutions and grassroots push...
 
11 Tips for 2011: Making Social Media Marketing Work Smarter For You
11 Tips for 2011: Making Social Media Marketing Work Smarter  For You11 Tips for 2011: Making Social Media Marketing Work Smarter  For You
11 Tips for 2011: Making Social Media Marketing Work Smarter For You
 
Puntuaciones provisionales (martes 25 a las 12h)
Puntuaciones provisionales (martes 25 a las 12h)Puntuaciones provisionales (martes 25 a las 12h)
Puntuaciones provisionales (martes 25 a las 12h)
 
Introduction: Jukka Huhtamäki | Dagstuhl 16141
Introduction: Jukka Huhtamäki | Dagstuhl 16141Introduction: Jukka Huhtamäki | Dagstuhl 16141
Introduction: Jukka Huhtamäki | Dagstuhl 16141
 
Overwhelming Numbers
Overwhelming NumbersOverwhelming Numbers
Overwhelming Numbers
 
Puntuaciones provisionales (martes 25 a las 12h)
Puntuaciones provisionales (martes 25 a las 12h)Puntuaciones provisionales (martes 25 a las 12h)
Puntuaciones provisionales (martes 25 a las 12h)
 
09. permendikbud nomor 71 tahun 2013 ttg buku teks pelajaran layak
09. permendikbud nomor 71 tahun 2013 ttg buku teks pelajaran layak09. permendikbud nomor 71 tahun 2013 ttg buku teks pelajaran layak
09. permendikbud nomor 71 tahun 2013 ttg buku teks pelajaran layak
 
マイナンバーセミナー補足資料
マイナンバーセミナー補足資料マイナンバーセミナー補足資料
マイナンバーセミナー補足資料
 
Oracle prm安装说明
Oracle prm安装说明Oracle prm安装说明
Oracle prm安装说明
 
Fluids &amp; Electrolytes
Fluids &amp; ElectrolytesFluids &amp; Electrolytes
Fluids &amp; Electrolytes
 

Similar to 追求Jdbc on oracle最佳性能?如何才好?

JDBC for CSQL Database
JDBC for CSQL DatabaseJDBC for CSQL Database
JDBC for CSQL Databasejitendral
 
JDBC - JPA - Spring Data
JDBC - JPA - Spring DataJDBC - JPA - Spring Data
JDBC - JPA - Spring DataArturs Drozdovs
 
Exactly once with spark streaming
Exactly once with spark streamingExactly once with spark streaming
Exactly once with spark streamingQuentin Ambard
 
Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Zianed Hou
 
Jdbc oracle
Jdbc oracleJdbc oracle
Jdbc oracleyazidds2
 
關於測試,我說的其實是......
關於測試,我說的其實是......關於測試,我說的其實是......
關於測試,我說的其實是......hugo lu
 
JDBC Connecticity.ppt
JDBC Connecticity.pptJDBC Connecticity.ppt
JDBC Connecticity.pptSwapnil Kale
 
Sedna XML Database: Executor Internals
Sedna XML Database: Executor InternalsSedna XML Database: Executor Internals
Sedna XML Database: Executor InternalsIvan Shcheklein
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09Guy Korland
 
Node.js System: The Landing
Node.js System: The LandingNode.js System: The Landing
Node.js System: The LandingHaci Murat Yaman
 
Production MongoDB in the Cloud
Production MongoDB in the CloudProduction MongoDB in the Cloud
Production MongoDB in the Cloudbridgetkromhout
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyAlexandre Morgaut
 
Asynchronous programming done right - Node.js
Asynchronous programming done right - Node.jsAsynchronous programming done right - Node.js
Asynchronous programming done right - Node.jsPiotr Pelczar
 

Similar to 追求Jdbc on oracle最佳性能?如何才好? (20)

JDBC for CSQL Database
JDBC for CSQL DatabaseJDBC for CSQL Database
JDBC for CSQL Database
 
JDBC - JPA - Spring Data
JDBC - JPA - Spring DataJDBC - JPA - Spring Data
JDBC - JPA - Spring Data
 
Exactly once with spark streaming
Exactly once with spark streamingExactly once with spark streaming
Exactly once with spark streaming
 
Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1
 
Jdbc oracle
Jdbc oracleJdbc oracle
Jdbc oracle
 
關於測試,我說的其實是......
關於測試,我說的其實是......關於測試,我說的其實是......
關於測試,我說的其實是......
 
JDBC Connecticity.ppt
JDBC Connecticity.pptJDBC Connecticity.ppt
JDBC Connecticity.ppt
 
Sedna XML Database: Executor Internals
Sedna XML Database: Executor InternalsSedna XML Database: Executor Internals
Sedna XML Database: Executor Internals
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09
 
Jdbc
JdbcJdbc
Jdbc
 
Java JDBC
Java JDBCJava JDBC
Java JDBC
 
Data Access with JDBC
Data Access with JDBCData Access with JDBC
Data Access with JDBC
 
Node.js System: The Landing
Node.js System: The LandingNode.js System: The Landing
Node.js System: The Landing
 
Production MongoDB in the Cloud
Production MongoDB in the CloudProduction MongoDB in the Cloud
Production MongoDB in the Cloud
 
Jdbc ppt
Jdbc pptJdbc ppt
Jdbc ppt
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love story
 
Import java
Import javaImport java
Import java
 
Exception Handling in Scala
Exception Handling in ScalaException Handling in Scala
Exception Handling in Scala
 
Asynchronous programming done right - Node.js
Asynchronous programming done right - Node.jsAsynchronous programming done right - Node.js
Asynchronous programming done right - Node.js
 
Celery
CeleryCelery
Celery
 

More from maclean liu

Oracle専用データ復旧ソフトウェアprm dulユーザーズ・マニュアル
Oracle専用データ復旧ソフトウェアprm dulユーザーズ・マニュアルOracle専用データ復旧ソフトウェアprm dulユーザーズ・マニュアル
Oracle専用データ復旧ソフトウェアprm dulユーザーズ・マニュアルmaclean liu
 
【诗檀软件 郭兆伟-技术报告】跨国企业级Oracle数据库备份策略
【诗檀软件 郭兆伟-技术报告】跨国企业级Oracle数据库备份策略【诗檀软件 郭兆伟-技术报告】跨国企业级Oracle数据库备份策略
【诗檀软件 郭兆伟-技术报告】跨国企业级Oracle数据库备份策略maclean liu
 
基于Oracle 12c data guard & far sync的低资源消耗两地三数据中心容灾方案
基于Oracle 12c data guard & far sync的低资源消耗两地三数据中心容灾方案基于Oracle 12c data guard & far sync的低资源消耗两地三数据中心容灾方案
基于Oracle 12c data guard & far sync的低资源消耗两地三数据中心容灾方案maclean liu
 
TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例maclean liu
 
PRM DUL Oracle Database Health Check
PRM DUL Oracle Database Health CheckPRM DUL Oracle Database Health Check
PRM DUL Oracle Database Health Checkmaclean liu
 
dbdao.com 汪伟华 my-sql-replication复制高可用配置方案
dbdao.com 汪伟华 my-sql-replication复制高可用配置方案dbdao.com 汪伟华 my-sql-replication复制高可用配置方案
dbdao.com 汪伟华 my-sql-replication复制高可用配置方案maclean liu
 
Vbox virtual box在oracle linux 5 - shoug 梁洪响
Vbox virtual box在oracle linux 5 - shoug 梁洪响Vbox virtual box在oracle linux 5 - shoug 梁洪响
Vbox virtual box在oracle linux 5 - shoug 梁洪响maclean liu
 
Shoug at apouc2015 4min pitch_biotwang_v2
Shoug at apouc2015 4min pitch_biotwang_v2Shoug at apouc2015 4min pitch_biotwang_v2
Shoug at apouc2015 4min pitch_biotwang_v2maclean liu
 
Apouc 4min pitch_biotwang_v2
Apouc 4min pitch_biotwang_v2Apouc 4min pitch_biotwang_v2
Apouc 4min pitch_biotwang_v2maclean liu
 
使用Oracle osw analyzer工具分析oswbb日志,并绘制系统性能走势图1
使用Oracle osw analyzer工具分析oswbb日志,并绘制系统性能走势图1使用Oracle osw analyzer工具分析oswbb日志,并绘制系统性能走势图1
使用Oracle osw analyzer工具分析oswbb日志,并绘制系统性能走势图1maclean liu
 
诗檀软件 Oracle开发优化基础
诗檀软件 Oracle开发优化基础 诗檀软件 Oracle开发优化基础
诗檀软件 Oracle开发优化基础 maclean liu
 
Orclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wang
Orclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wangOrclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wang
Orclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wangmaclean liu
 
诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24
诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24
诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24maclean liu
 
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践maclean liu
 
Prm dul is an oracle database recovery tool database
Prm dul is an oracle database recovery tool   databasePrm dul is an oracle database recovery tool   database
Prm dul is an oracle database recovery tool databasemaclean liu
 
Oracle prm dul, jvm and os
Oracle prm dul, jvm and osOracle prm dul, jvm and os
Oracle prm dul, jvm and osmaclean liu
 
Oracle dba必备技能 使用os watcher工具监控系统性能负载
Oracle dba必备技能   使用os watcher工具监控系统性能负载Oracle dba必备技能   使用os watcher工具监控系统性能负载
Oracle dba必备技能 使用os watcher工具监控系统性能负载maclean liu
 
Parnassus data recovery manager for oracle database user guide v0.3
Parnassus data recovery manager for oracle database user guide v0.3Parnassus data recovery manager for oracle database user guide v0.3
Parnassus data recovery manager for oracle database user guide v0.3maclean liu
 
诗檀软件 Oracle数据块损坏知识
诗檀软件 Oracle数据块损坏知识诗檀软件 Oracle数据块损坏知识
诗檀软件 Oracle数据块损坏知识maclean liu
 
Prm 一个oracle数据库灾难恢复救护车工具
Prm 一个oracle数据库灾难恢复救护车工具Prm 一个oracle数据库灾难恢复救护车工具
Prm 一个oracle数据库灾难恢复救护车工具maclean liu
 

More from maclean liu (20)

Oracle専用データ復旧ソフトウェアprm dulユーザーズ・マニュアル
Oracle専用データ復旧ソフトウェアprm dulユーザーズ・マニュアルOracle専用データ復旧ソフトウェアprm dulユーザーズ・マニュアル
Oracle専用データ復旧ソフトウェアprm dulユーザーズ・マニュアル
 
【诗檀软件 郭兆伟-技术报告】跨国企业级Oracle数据库备份策略
【诗檀软件 郭兆伟-技术报告】跨国企业级Oracle数据库备份策略【诗檀软件 郭兆伟-技术报告】跨国企业级Oracle数据库备份策略
【诗檀软件 郭兆伟-技术报告】跨国企业级Oracle数据库备份策略
 
基于Oracle 12c data guard & far sync的低资源消耗两地三数据中心容灾方案
基于Oracle 12c data guard & far sync的低资源消耗两地三数据中心容灾方案基于Oracle 12c data guard & far sync的低资源消耗两地三数据中心容灾方案
基于Oracle 12c data guard & far sync的低资源消耗两地三数据中心容灾方案
 
TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例
 
PRM DUL Oracle Database Health Check
PRM DUL Oracle Database Health CheckPRM DUL Oracle Database Health Check
PRM DUL Oracle Database Health Check
 
dbdao.com 汪伟华 my-sql-replication复制高可用配置方案
dbdao.com 汪伟华 my-sql-replication复制高可用配置方案dbdao.com 汪伟华 my-sql-replication复制高可用配置方案
dbdao.com 汪伟华 my-sql-replication复制高可用配置方案
 
Vbox virtual box在oracle linux 5 - shoug 梁洪响
Vbox virtual box在oracle linux 5 - shoug 梁洪响Vbox virtual box在oracle linux 5 - shoug 梁洪响
Vbox virtual box在oracle linux 5 - shoug 梁洪响
 
Shoug at apouc2015 4min pitch_biotwang_v2
Shoug at apouc2015 4min pitch_biotwang_v2Shoug at apouc2015 4min pitch_biotwang_v2
Shoug at apouc2015 4min pitch_biotwang_v2
 
Apouc 4min pitch_biotwang_v2
Apouc 4min pitch_biotwang_v2Apouc 4min pitch_biotwang_v2
Apouc 4min pitch_biotwang_v2
 
使用Oracle osw analyzer工具分析oswbb日志,并绘制系统性能走势图1
使用Oracle osw analyzer工具分析oswbb日志,并绘制系统性能走势图1使用Oracle osw analyzer工具分析oswbb日志,并绘制系统性能走势图1
使用Oracle osw analyzer工具分析oswbb日志,并绘制系统性能走势图1
 
诗檀软件 Oracle开发优化基础
诗檀软件 Oracle开发优化基础 诗檀软件 Oracle开发优化基础
诗檀软件 Oracle开发优化基础
 
Orclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wang
Orclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wangOrclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wang
Orclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wang
 
诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24
诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24
诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24
 
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
使用Virtual box在oracle linux 5.7上安装oracle database 11g release 2 rac的最佳实践
 
Prm dul is an oracle database recovery tool database
Prm dul is an oracle database recovery tool   databasePrm dul is an oracle database recovery tool   database
Prm dul is an oracle database recovery tool database
 
Oracle prm dul, jvm and os
Oracle prm dul, jvm and osOracle prm dul, jvm and os
Oracle prm dul, jvm and os
 
Oracle dba必备技能 使用os watcher工具监控系统性能负载
Oracle dba必备技能   使用os watcher工具监控系统性能负载Oracle dba必备技能   使用os watcher工具监控系统性能负载
Oracle dba必备技能 使用os watcher工具监控系统性能负载
 
Parnassus data recovery manager for oracle database user guide v0.3
Parnassus data recovery manager for oracle database user guide v0.3Parnassus data recovery manager for oracle database user guide v0.3
Parnassus data recovery manager for oracle database user guide v0.3
 
诗檀软件 Oracle数据块损坏知识
诗檀软件 Oracle数据块损坏知识诗檀软件 Oracle数据块损坏知识
诗檀软件 Oracle数据块损坏知识
 
Prm 一个oracle数据库灾难恢复救护车工具
Prm 一个oracle数据库灾难恢复救护车工具Prm 一个oracle数据库灾难恢复救护车工具
Prm 一个oracle数据库灾难恢复救护车工具
 

Recently uploaded

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Recently uploaded (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

追求Jdbc on oracle最佳性能?如何才好?

  • 4. Jdbc性能案例1:问题 for (i = 0; i < 1000000; i++) { conn = ds.getConnection(userid, password); pstmt = conn.prepareStatement("SELECT name FROM employees WHERE id = " + i); rset = pstmt.executeQuery(); ...... conn.close(); } 循环内获得connection 并解 析执行,connection、非缓 存的解析在Oracle中都很昂 贵
  • 5. Jdbc性能案例1:结果 • 响应时间: 150ms • 吞吐量: 300tps •CPU方面Sys和User都很高
  • 6. Jdbc1性能案例1:对策 conn = ds.getConnection(userid, password); for (i = 0; i < 1000000; i++) { pstmt = conn.prepareStatement("SELECT name FROM employees WHERE id = " + i); rset = pstmt.executeQuery(); ...... } conn.close(); 只建立必要的connection到 数据库
  • 7. Jdbc1性能案例1:改良后 •响应时间: 20ms •吞吐量: 3,000tps •latch: shared pool 此时的瓶颈凸显在解析(parse)并发争用上
  • 8. Jdbc性能案例1:原因 conn = ds.getConnection(userid, password); for (i = 0; i < 1000000; i++) { { pstmt = conn.prepareStatement("SELECT name FROM employees WHERE id = " + i); rset = pstmt.executeQuery(); ...... } conn.close(); 每次执行都使用拼凑的SQL 语句,未启用绑定变量,默 认情况下每次均硬解析hard parse
  • 9. Jdbc性能案例1:进一步对策 conn = ds.getConnection(userid, password); for (i = 0; i < 1000000; i++) { { pstmt = conn.prepareStatement("SELECT name FROM employees WHERE id = ?"); pstmt.setInt(1, i); rset = pstmt.executeQuery(); ...... } conn.close(); 使用绑定变量,避免每次执 行都硬解析
  • 10. Jdbc1性能案例1:再改良后 •响应时间: 1ms •吞吐量: 25,000tps •并发争用减少 •CPU被充分使用
  • 11. Jdbc1性能案例1:正确使用PrepareStatement •PrepareStatement –SQL语句解析 •Bind –变量绑定 •Execute –SQL语句执行 × For { PrepareStatement Bind Execute } ○ PrepareStatement For { Bind Execute }
  • 12. Jdbc1性能案例1:进一步对策 conn = ds.getConnection(userid, password); pstmt = conn.prepareStatement("SELECT name FROM employees WHERE id = ?"); for (i = 0; i < 1000000; i++) { { pstmt.setInt(1, i); rset = pstmt.executeQuery(); ...... } conn.close(); 预解析,只解析一次 For prepareStatement , http://www.oracle.com/technetwork/testcontent/jdbc- ch5-131209.pdf
  • 13. Jdbc1性能案例1:再再改良后 •响应时间: 1ms •吞吐量: 34,000tps •吞吐量进一步提高
  • 15. Jdbc1性能案例2:永远不够的open_cursor •ORA-1000报错” maximum open cursors exceeded”达到session 最大游标数 •故障发生业务停滞 •大量SQL*Net break/reset to client等待事件 •OPEN_CURSOR参数已经很大了,都到 10000了,开发人员要求DBA进一步加大该 参数到30000
  • 16. Jdbc1性能案例2:原因 try { ...... rset = pstmt.executeQuery(); ...... rset.close(); pstmt.close(); } catch (SQLException e) { e.printStackTrace(); } 代码里是写了关闭游标,但 存在还没执行就跑到异常处 理里去的可能。
  • 17. Jdbc1性能案例2:对策 try { ...... rset = pstmt.executeQuery(); ...... rset.close(); } catch (SQLException e) { e.printStackTrace(); } finally { if (pstmt != null) try {pstmt.close();} catch (SQLException e) {...} } Finally中调用关闭游标, TRY块结束后总会执行
  • 18. Jdbc1性能案例3:永远不够的processes •吞吐量接近于零 •负载也接近于零 •CPU使用率也接近于零 •告警日志中出现ORA-00020错误? •吞吐量暴跌,应用会话无法连接数据库?开发 人员要求DBA进一步加到processes参数?
  • 19. Jdbc1性能案例3:原因 try { ...... rset = pstmt.executeQuery(); ...... rset.close(); pstmt.close(); conn.close(); } catch (SQLException e) { e.printStackTrace(); } 代码里是写了关闭 connection,但存在还没执 行就跑到异常处理里去的可 能。
  • 20. Jdbc1性能案例3:对策 try { ...... rset = pstmt.executeQuery(); ...... rset.close(); } catch (SQLException e) { e.printStackTrace(); } finally { if (pstmt != null) try {pstmt.close();} catch (SQLException e) {...} if (conn != null) try {conn.close();} catch (SQLException e) {...} } Finally中调用关闭connection, TRY块结束后总会执行
  • 21. Jdbc1性能案例4 •莫名出现大量锁等待 •没有任何告警,但所有应用全部超时? •大量session处于锁等待挂起状态 •开发人员要求DBA去kill锁数据的session?
  • 22. Jdbc1性能案例4:原因 try { ...... rset = pstmt.executeUpdate(); ...... conn.commit(); pstmt.close(); conn.close(); } catch (SQLException e) { e.printStackTrace(); } 代码中写了commit,但没考 虑异常处理 可能的session leak
  • 23. Jdbc1性能案例4:对策 try { ...... rset = pstmt.executUpdate(); ...... conn.commit(); } catch (SQLException e) { if (conn != null ) try {conn.rollback();} catch (SQLException e) {...} e.printStackTrace(); } finally { if (pstmt != null) try {pstmt.close();} catch (SQLException e) {...} if (conn != null) try {conn.close();} catch (SQLException e) {...} } 当出现异常就rollback释放锁
  • 24. Other tips:Set AutoCommit Off 关闭自动commit,在应用真正需要的时候commit, 即维护了必要的事务又减少了log file sync等待 Connection.setAutoCommit(false);
  • 25. Other tips:批量Insert DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection ("jdbc:oracle:oci8:@","scott","tiger"); PreparedStatement ps = conn.prepareStatement ("insert into dept values (?, ?,?)"); //Change batch size for this statement to 3 ((OraclePreparedStatement)ps).setExecuteBatch (3); ps.setInt (1, 23); ps.setString (2, "Sales"); ps.setString (3, "USA"); ps.executeUpdate (); //JDBC queues this for later execution ps.setInt (1, 24); ps.setString (2, "Blue Sky"); ps.setString (3, "Montana"); ps.executeUpdate (); //JDBC queues this for later execution ps.setInt (1, 25); ps.setString (2, "Applications"); ps.setString (3, "India"); ps.executeUpdate (); //The queue size equals the batch value of 3 //JDBC sends the requests to the // database ps.setInt (1, 26); ps.setString (2, "HR"); ps.setString (3, "Mongolia"); ps.executeUpdate (); //JDBC queues this for later execution ((OraclePreparedStatement)ps).sendBatch (); //JDBC sends the queued request …………………..
  • 26. Other tips:Prefetch Rows DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection ("jdbc:oracle:oci8:@","scott","tiger"); //Set the default row prefetch setting for this connection ((OracleConnection)conn).setDefaultRowPrefetch (7); /* The following statement gets the default row prefetch value for the connection, that is, 7. */ Statement stmt = conn.createStatement (); /* Subsequent statements look the same, regardless of the row prefetch value. Only execution time changes. */ ResultSet rset = stmt.executeQuery ("select ename from emp"); System.out.println ( rset.next () ); while( rset.next () ) System.out.println ( rset.getString (1) ); //Override the default row prefetch setting for this statement ( (OracleStatement)stmt ).setRowPrefetch (2); rset = stmt.executeQuery ("select ename from emp"); System.out.println ( rset.next () ); while( rset.next () ) System.out.println ( rset.getString (1) );
  • 27. Oracle Database 11g R2 JDBC BasicFiles LOB Pre-Fetch setLobPrefetchsize() select name, bio from LOB_tab 1.Parse 2.Execute 3.Fetch metadata 4.Fetch LOB data Faster Lob Data Fetching by performing all operations on server in a single single roundtrip
  • 28. Oracle Database 11g R2 Zero-Copy SecureFiles LOB setupSecureFile() Blob.getBytes() 1.Fetch LOB data (bypass internal buffer) Faster SecureFiles operations by bypassing server-side buffer copy
  • 29. JDBC Lob Pre-Fetch Performance Performance benchmark fetches CLOBs of sizes 1K to 50K with PREFETCH enabled and PREFETCH disabled, against BASICFILE LOBs and SECUREFILE LOBs.