How do you use send_query of the PG::Connection class in the Ruby pg gem?
===

How do you use the public instance method `send_query` of the `PG::Connection` class in the Ruby pg gem?  

Can it help speed up the execution time of a program like this?

    a = [1,2,3,4,5,6,...,100000]  # elements in no specific order
    conn = PG.connect(OMITTED)
    conn.transaction do |conn|
      a.each do |i]
        conn.exec("INSERT INTO numbers VALUES ($1)",[i])
      end
    end

**Hypothesis**: If I don't wait for the result, then I can keep sending queries to the PostgreSQL server and finish sooner.

**Experiment**: Rewritten version:

    a = [1,2,3,4]
    conn = PG.connect(OMITTED)
    conn.setnonblocking(true)
    conn.transaction do |conn|
      a.each do |i]
        conn.send_query("INSERT INTO numbers VALUES ($1)",[i])
      end
    end


**Result**: No difference in running time.

Some additional questions:

 - Is my assumption correct? 
 - Is this necessarily a job for threads?  
 - Am I supposed to handle the output from exec somehow?  


   