cancel
Showing results for 
Search instead for 
Did you mean: 

lightweight command to test JDBC connections on a pool

Former Member
0 Kudos

Hi,

today to test a pool of JDBC connections i use this command:

SELECT NOW() FROM DBA.DUAL

i'm using a lightweight command? or exists some other that can cost less to database?

thanks for any tip

Clóvis

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

>

SELECT NOW() FROM DBA.DUAL

Hi Clovis,

the command is pretty lightweight.

No IO is needed for that.

If you want to save even more CPU cycles, you may try switching to

SELECT user FROM DBA.DUAL

This should be a little tick quicker as it does not need to make a system call to get the current time.

Anyhow, the difference should be negligible.

regards,

Lars

lbreddemann
Active Contributor
0 Kudos

HI Clovis,

just popped into my mind that selecting a constant would be even less resource intense...


select 1 from dual;

regards,

Lars

Answers (0)