This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-18
Channels
- # adventofcode (18)
- # announcements (1)
- # asami (99)
- # babashka (4)
- # beginners (45)
- # calva (20)
- # cider (44)
- # cljdoc (5)
- # clojure (66)
- # clojure-australia (2)
- # clojure-europe (36)
- # clojure-nl (11)
- # clojure-norway (4)
- # clojure-seattle (1)
- # clojure-uk (88)
- # clojurescript (37)
- # community-development (8)
- # conjure (8)
- # datascript (4)
- # datomic (29)
- # depstar (12)
- # emacs (7)
- # events (1)
- # fulcro (29)
- # graalvm (4)
- # graphql (2)
- # helix (2)
- # integrant (4)
- # jobs (7)
- # jobs-discuss (1)
- # lsp (3)
- # malli (6)
- # off-topic (61)
- # pathom (67)
- # pedestal (3)
- # re-frame (9)
- # reitit (4)
- # remote-jobs (13)
- # reveal (18)
- # shadow-cljs (59)
- # spacemacs (1)
- # sql (7)
- # startup-in-a-month (1)
- # tools-deps (29)
- # vim (12)
Hi, I’m using clojure.java.jdbc with jtds in a somewhat older project, and because of some changes in the data volume, the queries are getting way too slow. The reason seems to be this: http://www.jochenhebbrecht.be/site/2014-05-01/java/fixing-slow-queries-running-sql-server-using-jpa-hibernate-and-jtds. If I “manually” plug my parameters into the query, it’s fast again, but I can’t figure out how to pass the property in the connection map.
@mathias_dw just add :sendStringParametersAsUnicode false
to your db-spec hash map?
oh that’s what i tried but it didn’t speed up in the same way as when i manually inserted them into the query string
but thanks a lot for the quick reply, @seancorfield! I’ll try it again.
(tried again from scratch with the parameter added, but no improvement)
Sorry, not sure what to suggest then. Are you building a connection pool, or just relying on c.j.j creating a connection directly from the db-spec hash map?
no worries 🙂 It’s just a connection with the db-spec map. It’s no big deal to manually create the query string, since it’s from a pre-defined list of values.