Re: slow mysql inserts

2011-01-19 Thread Christian Vest Hansen
I suspect that ClojureQL and with-connection are opening and closing the connection for every query, whereas the Java and Perl versions are reusing their connections. Try adding a connection pool to the mix. On Tue, Jan 18, 2011 at 19:32, rygorr ryg...@gmail.com wrote: I'm currently doing some

Re: slow mysql inserts

2011-01-19 Thread Meikel Brandmeyer
Hi, On 18 Jan., 19:32, rygorr ryg...@gmail.com wrote: (doseq [x (range 2000)]     (with-connection db        (insert-values :test                       [:value] [x]))) db is the com.mysql.jdbc.Driver connection string. Move the with-connection outside the doseq. (with-connection db

Re: slow mysql inserts

2011-01-19 Thread rygorr
This was it. The overhead was in creating the handle. When I moved the doseq inside the with-connection it solved the problem. Thanks On Jan 19, 2011, at 7:24 AM, Meikel Brandmeyer wrote: Hi, On 18 Jan., 19:32, rygorr ryg...@gmail.com wrote: (doseq [x (range 2000)]

Re: slow mysql inserts

2011-01-19 Thread Michael Ossareh
On Wed, Jan 19, 2011 at 09:15, rygorr ryg...@gmail.com wrote: This was it. The overhead was in creating the handle. I can't remember who told me this: Always blame the network. In finer detail, the conversation was about things that use the network and are so very much slower than you

slow mysql inserts

2011-01-18 Thread rygorr
I'm currently doing some preliminary performance testing of db inserts with various technologies. The db server itself is nothing special but what surprised me was the difference in INSERT speeds between Clojure and the other solutions I've tried. Clearly there is something I'm missing so