Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: performance problem with oracle dbd

by etcshadow (Priest)
on Apr 16, 2004 at 01:20 UTC ( [id://345595]=note: print w/replies, xml ) Need Help??


in reply to performance problem with oracle dbd

From what info you've provided, the problem could be a network latency issue. If you are doing something like:
for (1..1000) { $sth->execute(); }
then you are communicating with the server, over the network, 1000 times. Each communication could be composed of several packets. Even if you assume just one packet round trip per communication (although it is possibly more), and a pretty good round-trip time of 10ms, then that's 10 seconds worth of network time.

Compare that to doing the same with pl/sql: you only have one such communication with the server (to execute the pl/sql function, with the loop inside). Basically zero network time.

Additionally, with the way that oracle handles inserts, internally, there is not necessarily a whole heck of a lot of overhead (assuming that the table is pre-extended, and particularly if you're not inserting data into indexed columns). Thus, network back-and-forth time could be a considerable overhead. However, a 5x difference is a bit much, unless the network connecting the DBI machine and the oracle server has some considerable latency. One thing to check is simply the ping time between them.

------------ :Wq Not an editor command: Wq

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://345595]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found