anchor.diff:                          for i,j in fieldMap do
                               args.[j] <- reader.Reader.GetValue(i) 
                           yield cons.Invoke(args) :?> 'T
  +
  +                if opts.logQueries || ((System.DateTime.Now - start).TotalMilliseconds > opts.logLongerThan) then
  +                    sprintf "%d\t%f\t%s" (command.GetConnHash()) ((System.DateTime.Now-start).TotalMilliseconds) sql |> x.Log
  +                    
               } 
   
             member x.ExecuteScalar(sql:string) =
               if x.LogQueries then x.Log(sql)
  +            let start = System.DateTime.Now
               use comm = x.Command sql
  -            comm.ExecuteScalar()
  +            let r = comm.ExecuteScalar()
  +
  +            if opts.logQueries || ((System.DateTime.Now - start).TotalMilliseconds > opts.logLongerThan) then
  +                    sprintf "%d\t%f\t%s" (x.GetHashCode()) ((System.DateTime.Now-start).TotalMilliseconds) sql |> x.Log
  +            r
   
   
             new(connStr:string) = new DynamicSqlConnection(connStr,10)
             member private x.Pool = pool
             /// Creates command that calls the specified stored procedure
             static member (?) (conn:DynamicSqlConnection, name) = 
  -            let connection = conn.Pool.Take()
  +            let connection = conn.Take() // Pool.Take()
               use command =  connection.CreateCommand() 
               command.CommandText <- name 
               command.CommandType <- CommandType.StoredProcedure
  -            new DynamicSqlCommand(command,(fun () -> conn.Pool.Release(connection)),conn.Opts,conn.Log)
  +            new DynamicSqlCommand(command,(fun () -> conn.Release(connection)),conn.Opts,conn.Log)
   
             member x.cc comm = x.Command comm
             member x.Command(commandText:string) =
  -            let conn = pool.Take()
  +            let conn = x.Take()
               use comm = conn.CreateCommand()
               comm.CommandText <- commandText
               //match trans with | None -> () | Some(t) -> comm.Transaction <- t
  -            new DynamicSqlCommand(comm,(fun () -> pool.Release(conn)),x.Opts,x.Log)
  +            new DynamicSqlCommand(comm,(fun () -> x.Release(conn)),x.Opts,x.Log)
   
             member x.StartTrans() = 
  -            let conn = pool.Take() // reserve a connection that will be shared across the transaction
  -            new DynamicSqlTransaction(conn,(fun () -> pool.Release(conn)),x.Opts,x.Log)
  +            let conn = x.Take() // reserve a connection that will be shared across the transaction
  +            new DynamicSqlTransaction(conn,(fun () -> x.Release(conn)),x.Opts,x.Log)
   
             interface IDisposable with
               member x.Dispose() = 
  
positive.code:             //use command =  connection.CreateCommand()
              //use command = new DynamicSqlCommand(sql,fun () -> pool.Release(connection))
              //command.CommandText <- sql 
              if x.LogQueries then x.Log(sql)
  
              use command : DynamicSqlCommand = x.Command sql
              /// Determine details of this record's constructor
              let cons = typeof<'T>.UnderlyingSystemType.GetConstructors() |> Array.filter (fun c -> c.IsConstructor) |> Seq.head
              let argMap = cons.GetParameters() |> Array.mapi (fun i v -> (v.Name.ToLower(),i)) |> Map.ofSeq
              let args = Array.init (cons.GetParameters().Length) (fun _ -> Object())
              seq {
                  use reader = command.ExecuteReader()
                  let fieldMap = [for i in 0..reader.Reader.FieldCount-1 -> 
                                      match argMap.TryFind (reader.Reader.GetName(i).ToLower()) with
  
negative.code:                                     opts.logfileName <- Some(fileName)
                                      opts.logfile<- Some(new StreamWriter(fileName))
  
            member x.Take() = take()
            member x.Release(z) = release z
            member x.Opts with get() = opts
            member x.Log(msg:string) = log msg
            member x.LogConnUse with get() = opts.logConnUse and set(v) = opts.logConnUse <- v  
            member x.LogQueries with get() = opts.logQueries and set(v) = opts.logQueries <- v  
            member x.LogLongerThan with get() = opts.logLongerThan  and set(v) = opts.logLongerThan <- v  
  