Fork me on GitHub

Hi, @seancorfield! I'm starting to look at 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, 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.

👍 4