This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-05
Channels
- # announcements (13)
- # aws (1)
- # bangalore-clj (4)
- # beginners (66)
- # boot (11)
- # calva (27)
- # cider (27)
- # clj-kondo (76)
- # cljdoc (6)
- # cljs-dev (38)
- # clojars (3)
- # clojure (143)
- # clojure-dev (2)
- # clojure-europe (6)
- # clojure-greece (10)
- # clojure-italy (10)
- # clojure-nl (5)
- # clojure-norway (2)
- # clojure-sweden (1)
- # clojure-uk (19)
- # clojurescript (49)
- # cursive (13)
- # datomic (14)
- # duct (6)
- # figwheel-main (3)
- # fulcro (31)
- # funcool (7)
- # jobs (3)
- # keechma (142)
- # liberator (1)
- # off-topic (15)
- # om (2)
- # reagent (1)
- # reitit (2)
- # remote-jobs (1)
- # rewrite-clj (73)
- # shadow-cljs (21)
- # spacemacs (18)
- # sql (5)
- # tools-deps (10)
- # yada (1)
Hi, @seancorfield! I'm starting to look at jdbc.next to migrate some projects where I need the best performance possible, because it has a lot of data migrating from one source to another... in this project I've using jdbc/db-query-with-resultset
so that I can get into ResultsetMetadata and extract info about the columns (type, lenght, precision, etc)... with jdbc.next, there is a case for that?
^ Won't getting this metadata once per table be faster than once per query?
@gleisonsilva I'd have to understand a lot more about your code to be able to comment on that.
@gleisonsilva The path I'd suggest is to use plan
and perhaps a custom row builder but without knowing more about exactly what you're trying to do, it's hard to offer anything more concrete.
Alternatively (`jdbc` here is next.jdbc
):
(with-open [con (jdbc/get-connection data-source)]
(with-open [ps (jdbc/prepare con ["...sql..." params ,,,])]
(with-open [rs (.executeQuery ps)]
(f rs))))
But I'd still recommend you try plan
and reduce
(or some transducing function) with a custom row builder, if needed.