是clojure.jdbc/insert!以批处理模式还是逐个完成?

是clojure.jdbc/insert!以批处理模式还是逐个完成?,clojure,Clojure,在我使用clojure.jdbc/insert之后!为了插入一些数据,它打印了许多“1”,所以我想知道插入是在批处理模式下完成的,性能更好,还是逐个完成的,速度较慢。我们最好让它像java jdbc批插入一样运行 clojurewerkz.testcom.core=> (time (apply (partial j/insert! postgres-db 'test_clojure [:a :b :c :d :e]) (map #(process-row % constraints)

在我使用clojure.jdbc/insert之后!为了插入一些数据,它打印了许多“1”,所以我想知道插入是在批处理模式下完成的,性能更好,还是逐个完成的,速度较慢。我们最好让它像java jdbc批插入一样运行

clojurewerkz.testcom.core=> (time (apply (partial j/insert! postgres-db  'test_clojure [:a :b :c :d :e])   (map #(process-row % constraints) (repeat 10000 row))))
"Elapsed time: 540.111482 msecs"
(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

clojure.jdbc/insert!最后打电话

(apply db-do-prepared db transaction? (first stmts) (rest stmts))
哪个调用
db执行准备好的语句
,所以看起来您的答案是肯定的!它分批进行