JDBC odbc performance issue...

I know this is not the right place to post this memo but some of you are very nice and have deep knowledge of what i am going to ask....

I have a java programme which call a stored procedure using oracle callable

( OracleCallableStatement ) slowConn.prepareCall( "{ call my_stored_proc(?,?) }");

which takes about less than a second..

Now, if i run this in a loop, in other words if this get calls multiple times, my cpu go crazy... almost 99% with 50 calls to this stored procedure if ran ||.

I checked about caching it. I did cached it but still my cpu consumption is same.

Any help is great.My connections are hopfully being closed or being opened as required..

Thanks in advance..

[735 byte] By [harry_singha] at [2007-10-3 9:27:46]
# 1

> I know this is not the right place to post this memo

> but some of you are very nice and have deep knowledge

> of what i am going to ask....

>

> I have a java programme which call a stored procedure

> using oracle callable

>

>

> ( OracleCallableStatement )

> slowConn.prepareCall( "{ call my_stored_proc(?,?)

> }");

>

> which takes about less than a second..

>

>

> Now, if i run this in a loop, in other words if this

> get calls multiple times, my cpu go crazy... almost

> 99% with 50 calls to this stored procedure if ran

> ||.

>

> I checked about caching it. I did cached it but

> still my cpu consumption is same.

>

> Any help is great.My connections are hopfully

> being closed or being opened as required..

>

>

>

> Thanks in advance..

Hello,

Are you opening and closing the connection in the for loop?

It is better to use a single connection and call the procedure multiple times.

I hopes this helps you..

Thanks and Regards,

prasanna.

Prasanna_Ma at 2007-7-15 4:42:04 > top of Java-index,Java Essentials,Java Programming...
# 2
@Op. Is that the only thing that you do in the loop?
kajbja at 2007-7-15 4:42:04 > top of Java-index,Java Essentials,Java Programming...