commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Eckenfels (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DBCP-357) Connection validationQuery mechanism should be replaced by new method connection#isValid()
Date Mon, 17 Feb 2014 23:58:20 GMT

    [ https://issues.apache.org/jira/browse/DBCP-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13903608#comment-13903608
] 

Bernd Eckenfels commented on DBCP-357:
--------------------------------------

Yes you are right, it is actually DB version dependend. If the DB is newer than versionNumber
>= 10102 then the OCI piggyback ping is used, otherwise the SELECT 'X' from DUAL. So for
most recent systems I guess the isValid() is fine. However if you specify a timeout it will
always fall back to the select method (and the additional new Thread()) - at least with the
Thin divers.

> Connection validationQuery mechanism should be replaced by new method connection#isValid()
> ------------------------------------------------------------------------------------------
>
>                 Key: DBCP-357
>                 URL: https://issues.apache.org/jira/browse/DBCP-357
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 1.4, 1.4.1
>            Reporter: Philippe Mouawad
>              Labels: PERFORMANCE
>             Fix For: 2.0
>
>
> Hello,
> Current method of connection validation relies on validationQuery.
> This method has a rather big performance impact on the DB (CPU, for example 3% with SELECT
1 FROM DUAL even with Oracle 10G FAST DUAL) and make an additional query for each borrow (when
testOnBorrow is true).
> Wouldn't it be better to use new JDBC 4 method isValid which relies on Driver check ?
(Oracle would for example use its internal method ping)
> Thank you
> Philippe
> http://www.ubik-ingenierie.com



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message