[JDBC-31] distinct? throws clojure.lang.ArityException, when applied with no arguments Created: 12/May/12 Updated: 10/Jun/12 Resolved: 10/Jun/12 |
|
| Status: | Resolved |
| Project: | java.jdbc |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Jürgen Hötzel | Assignee: | Sean Corfield |
| Resolution: | Completed | Votes: | 0 |
| Labels: | patch,, performance | ||
| Attachments: |
|
| Patch: | Code and Test |
| Description |
|
HSQLDB returns an empty ResultSet when using (.getGeneratedKeys stmt) While this Exception is caught in do-prepared-return-keys, this can lead to a huge overhead caused by the JVM exception handling. I did a performance test. Before Patch: clojure.java.test-jdbc> (time (sql/with-connection hsqldb-db (count (apply sql/insert-records :dummy (map #(hash-map :name (str %) :id %) (range 10000)))))) "Elapsed time: 3429.346743 msecs" 10000 After Patch: clojure.java.test-jdbc> (time (sql/with-connection hsqldb-db (count (apply sql/insert-records :dummy (map #(hash-map :name (str %) :id %) (range 10000)))))) "Elapsed time: 1397.444753 msecs" |
| Comments |
| Comment by Sean Corfield [ 10/Jun/12 5:24 PM ] |
|
Thanx for the patch! |