tags:

views:

22

answers:

1

What are the consequences, (if any) not calling the conn.logoff() method after the following script when connecting to an Oracle database using the Ruby OCI8 library.

conn = OCI8.new('scott', 'tiger')
 num_rows = conn.exec('SELECT * FROM emp') do |r|
   puts r.join(',')
 end
 puts num_rows.to_s + ' rows were processed.'

The reason I'm asking because we're experiencing slow downs with other applications that connect to this same Oracle db.

Thanks

A: 

I would imagine that when the Ruby process exits, the session will be killed automatically.

You could check by querying v$session to see if the ruby process is still connected to Oracle after Ruby exits.

Given only the information in your question, its really impossible to say what could be causing slowdowns - there are so many variable.

Stephen ODonnell