how to execute 30 transactions at a time

A

alwaysonnet

hi all,

I've a limitation with my database that it wont accept more than 30
queries at a time. i'm passing the queries as an array. if the length
of array is more than 30 , then execution is getting failed.

how can i implement so that every-time only 30 queries will be loaded
and rest will be loaded after their execution.

I believe we can just fix the length of array everytime ....but my mind
got numb thinking...

Thanks,
Raj
 
G

Gunnar Hjalmarsson

alwaysonnet said:
I've a limitation with my database that it wont accept more than 30
queries at a time. i'm passing the queries as an array. if the length
of array is more than 30 , then execution is getting failed.

how can i implement so that every-time only 30 queries will be loaded
and rest will be loaded after their execution.

while ( my @part = splice @arr, 0, 30 ) {
querydb( @part );
}
 
C

Craig

while ( my @part = splice @arr, 0, 30 ) { querydb( @part ); }

Wouldn't that load 31, not 30? :)
 
J

John W. Krahn

Craig said:
Wouldn't that load 31, not 30? :)

$ perl -le'my @arr = 1 .. 99; my @part = splice @arr, 0, 30; print "@part"'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30



John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,201
Messages
2,571,051
Members
47,656
Latest member
rickwatson

Latest Threads

Top