Druid数据库连接池介绍.pptx
《Druid数据库连接池介绍.pptx》由会员分享,可在线阅读,更多相关《Druid数据库连接池介绍.pptx(16页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、温绍锦(温高铁)http:/ DataSourceJboss DataSource(历史原因还在使用)稳定的特性-ExceptionSorter当连接产生不可恢复的异常时,需要及时从连接池中清除,否则会产生大量错误。这个功能也称为ExceptionSorter,只有JBossDataSource和DruidDataSource实现了这个功能。Oracle Fatal ExcetionError Code28Session has been killed600Internal oracle error1012Not logged on1014Oracle shutdown in progress
2、1033Oracle initialization or shutdown in progress1034Oracle not available1035ORACLE only available to users with RESTRICTED SESSION privilege1089Immediate shutdown in progres no operations are permitted1090Shutdown in progress no operations are permitted1092ORACLE instance terminated.Disconnection f
3、orced1094ALTER DATABASE CLOSE in progress.Connections not permittedMySql Fatal ExceptionError Code1040ER_CON_COUNT_EEROR1042ER_BAD_HOST_ERRROR1043ER_HANDSHAKE_ERROR1047ER_UNKOWN_COM_ERROR1081ER_IPSOCK_ERROR1029ER_HOST_IS_BLOCKED1030ER_HOST_NOT_PRIVILEGED1045ER_ACCESS_DENIED_ERROR1004ER_CANT_CREATE_F
4、ILE1005ER_CANT_CREAT_TABLE1015ER_CANT_LOCK1021ER_DISK_FULL高性能1 线程程2 线程程5 线程程10 线程程20线程程50线程程Druid1,1021,5091,8891,9042,0071,977Tomcat-jdbc1,3991,3782,2572,2892,3052,503DBCP3,1443,8346,2766,4086,5636,783BoneCP4,3273,5983,8005,2429,40219,066Jboss-Datasource4,9123,0496,8686,51240,14643,748C3P018,57019,
5、46715,27019,29428,19566,677Proxool16,22114,45524,68838,90548,087(Error)58,238(Error)详细测试信息:https:/ 线程2 线程5 线程10 线程20线程50线程01000020000300004000050000600007000080000DruidTomcat-jdbcDBCPBoneCPJboss-DatasourceC3P0ProxoolSQL ParserParser基本概念词法分析Token语法分析抽象语法树表达式语句手写Parser的性能Cobar的SQL Parser,从Antlr生成的pars
6、er修改为Druid Parser之后,大约提升6倍的性能。Druid Parser最近再次大幅度提升性能(50%)SQL Parser的关键在于词法词法分析要支持预测监控Spring关联监控Web关联监控查看SQL执行明细配置filters=log4j2013-07-12 16:10:17,966 DEBUG Connection:132-conn-10001 connected2013-07-12 16:10:17,970 DEBUG Connection:132-conn-10001 commited2013-07-12 16:10:17,970 DEBUG Connection:132
7、-conn 10001 rollback2013-07-12 16:10:17,983 DEBUG Statement:137-conn-10001,stmt-20000 created2013-07-12 16:10:17,986 DEBUG Statement:137-conn-10001,stmt-20000 executed.0.052501 millis.SELECT 12013-07-12 16:10:17,986 DEBUG Statement:137-conn-10001,stmt-20000 batch executed.0.041842 millis.SELECT 1201
8、3-07-12 16:10:18,205 DEBUG Statement:137-conn-10001,stmt-20000,rs-50000 query executed.219.082247 millis.SELECT 12013-07-12 16:10:18,205 DEBUG ResultSet:142-conn-10001,stmt-20000,rs-50000 open2013-07-12 16:10:18,206 DEBUG ResultSet:142-conn-10001,stmt-20000,rs-50000 Header:null2013-07-12 16:10:18,20
9、6 DEBUG Statement:137-conn-10001,stmt-20000 update executed.effort 0.0.019343 millis.SELECT 12013-07-12 16:10:18,223 DEBUG Statement:137-conn-10001,pstmt-20001 created.SELECT 12013-07-12 16:10:18,260 DEBUG Statement:137-conn-10001,pstmt-20001 Parameters:null,null,null,null,com.alibaba.druid.mock.Moc
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Druid 数据库连接 介绍
限制150内