Slow queries over I-Star
Posted in 1994
My client needs to transfer selected rows from tables on one machine to
another server. I am using SPL. I have tried two approaches and am amazed
at the differences in timings:
(1) insert into remote_table
select * from local_table
where <condition>; (2) foreach select * from local_table where <condition>
...
...
insert into remote_table values (x,y,z....); end foreach;
Approach (1) takes 35 seconds. Approach (2) takes 8 mins 40 seconds
without explicit transactions (ie. each insert is its own transaction)
and 5 mins 00 secs with the whole procedure in a single transaction.
The client favours Approach (2) because it allows the rest of the load to
proceed if one or two inserts encounter an error. (yes I know we'll have
to be careful to differentiate between kinds of error.)
The boxes are connected over X.25. I have no idea how much of the time
difference is made up by poor network tuning and how much is inherent in
the working of I-Star.
I'm using 5.00 and onsoctcp - would 6.00 and relay modules be any
quicker? Or is the real ball-and-chain simply X.25?
akent@cix.compulink.co.uk (Andy Kent)
-------------------------------------