Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

Need an alternative to optimize the performance

$
0
0

Hello,

this is the situation iam facing

for(details in arraylist)

{

callmethod(detail)

}

callmethod(detail)

{

begin transaction

queries database  with 3 select commands and checks if detail is valid else return

if valid

will get 2 variables required in the next step by querying db(using oracle)

makes a call to  procedure in db what happens in procedure is  inserting into table1 takes place by fetching data to be inserted from there itself and returns required varaibles(this one takes much time)

same thing happens again

gets 2 vraibles required

makes an insert into another table2(different from previous) from application by insert statement

update  table3

end transaction

}

to introduce iam new to asp.net,multithreaded programming&this forum

now i need to perform multithreading for this situation lets suppose we have 10000 details in arraylist i want to divide the job between the threads so it becomes faster so

here are my questions

1. can all the threads use single connection to query the db

2.while calling procedure in db,will a thread need to wait while another thread is executing the procedure

3.same with the insertion also will thread need to wait while other thread is executing

4.what are the measures i should take while using multi threading(To avoid any wrong operations)

5.any other performance improvement suggestons(btw all the queries are well optimized)

6.is there any way to execute the queries parallely within the method

if possible plz provide some code example or some resources to follow,plz excuse if i didnot asked in correct way

thank you in advance


Viewing all articles
Browse latest Browse all 1350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>