Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!

Apurv Adarsh

Greenhorn
+ Follow
since Feb 07, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Apurv Adarsh

Each thread is creating its own connection thru a connection pool whic is common to whole application. Oracle AWR shows that max per querry wait time is taken by a querry which is burried deep inside our rule engine.However this querry is optimized perfetly(cost = 16). we got a slight performancw bost when we switced our DB from 8 core cpu to 16 core cpu. This was expected but even then there was a bottelneck present.
Even our DBA was unable to explain this
We did some basic profiling and found out that the load on DB server is increasing as we increase the number of threads. If we take a 2 CPU box (DB server). It seams that even simple querries are taking propional increase in timings with the number of threads. I can't reproduce the exact data but here is what is a sample of what we found out for a chunk code of code which is executed in loop:

Threads: 1 4 10 20
Time(sec): 2 3 5 6

Hope you can provide some help. We scanned the code for single row updates and things like that but there were none
One querry with exclusive or statements
11 years ago
We had a simmilar problem once but we planned to write a data migration stored procedure for it. It was quite simple there.
11 years ago
Code looks fine to me
But when you say that the code is giving exceptions, It should be displayed when you do a "ex.printStackTrace()".
How did you know that it is giving you exceptions???
Just search for submit() an look at the code above it.
Can you try using selective OR in this querry?
the querry can be rewrriten like : SELECT id FROM tagnames WHERE name = ? AND (1 = ? OR namespace = ?)
and then you can have

if(null == namespace){
ps.setIntl(2,1);
ps.setNull(3, java.sql.Types.VARCHAR);
}else{
ps.setIntl(2,2);
ps.setStringl(3,"abc");
}
I havent tested this code but think it should run fine.
If you can do anything, you can implement a cryptographic algorithm. That is widely used in banks these days. Recommend you to look for RFC or IEEE papers if you are intrested.

Also, please take my advice and don't think about making bar graphs as your final year project. MS-Excel can do it perfetly fine
11 years ago
Couldn't figure out the exact reason, but most of the time I got this msg, either there was a problem with my insert script like inserting null into non nullable fields, or giving wrong spellings.
Please check you sql once.
Also, have look in your log4j for any connection error.

Also try looking for any specific error code from sql engine in log4j.
I Respectfully Decline The Offer To Join Your Hallucination
11 years ago
Hi all.I am new to java ranch.
We have a situtation where we are firiing same SP thru diffrent threads so that performance of SP may be may be increased. However, we noticed that the SP is taking more time to execute when we fire it paralley.
For eg: 10 threads are taking as much time as 2 threads. Please help us.