This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-22
Channels
- # announcements (3)
- # beginners (22)
- # braveandtrue (6)
- # calva (2)
- # cider (85)
- # cljdoc (1)
- # cljs-dev (21)
- # cljsrn (2)
- # clojure (70)
- # clojure-italy (9)
- # clojure-spec (1)
- # clojure-uk (144)
- # clojure-ukraine (6)
- # clojurescript (109)
- # cursive (59)
- # data-science (15)
- # datomic (40)
- # emacs (8)
- # fulcro (64)
- # funcool (8)
- # graphql (8)
- # hispano (3)
- # hoplon (7)
- # jobs-discuss (29)
- # leiningen (3)
- # luminus (2)
- # off-topic (13)
- # onyx (9)
- # parinfer (49)
- # pedestal (2)
- # portkey (8)
- # re-frame (10)
- # reagent (33)
- # reitit (13)
- # ring (2)
- # ring-swagger (16)
- # shadow-cljs (193)
- # spacemacs (1)
- # sql (19)
- # tools-deps (19)
But I got error in jdbc/db-do-commands
. It reports error:
The log 这个 ResultSet 已经被关闭。
means This ResultSet is already closed
.
What happened? This code If I changed to MySQL, it works fine.
@stardiviner could you try
(jdbc/db-do-commands postgresql-db false
[fruit-table-ddl
"CREATE INDEX name_idx ON fruit ( name );"])
(add false
as the second argument). I think PostgreSQL treats transactions differently for DDL.@seancorfield thanks for the previous tip, that worked really well, im just trying to improve the pool now
We use c3p0 happily in a high traffic production environment. We have not tried Hikari so I can't compare them. We did try BoneCP tho' -- that seemed faster overall than c3p0 but we saw fairly massive memory spikes during high traffic use so we went back to c3p0.
I would say try both c3p0 and Hikari and see which works better for you -- swapping connection pool libraries is pretty easy (assuming you have a function that turns DB access information into a {:datasource connection-pool}
style db-spec 🙂
Hikaricp is advertised (and was benchmarked by a few) as the fastest and more efficient of the 2
But sadly there some “heavy” query that makes jump from 80ms to 300ms to get the data
I’m doing some tests right now on it, on my dev it was awesome, on production i still cant tell
So… question about connection pool, if I put 100 at max, means that it can create 100 connections??? 100 threads?
100 max what? You can control all sorts of aspects of a connection pool. Consult the documentation for details.