Fork me on GitHub
#sql
<
2019-05-17
>
manuel08:05:36

@seancorfield a little feedback: I just moved a personal project from org.clojure/java.jdbc to seancorfield/next.jdbc (https://github.com/manuel-uberti/boodle). Everything went smoothly, so thanks a lot for the great job and docs. 🙂

4
gklijs09:05:34

In about the same category I just open sourced https://github.com/openweb-nl/open-bank-mark witch moved postgres.async -> java.jdbc -> next.jdbc

4
ikitommi09:05:50

@gklijs what were the reasons & end results in moving from async to sync with your db-access?

gklijs09:05:43

In my case it was important to keep order, so I wasn't really using the async part. I think cpu was pretty high, and performance not so good. But simplicity was the most important reason to move.

ikitommi10:05:46

thanks for the insights. interesting note on the performance (haven’t used any of the clojure async wrappers myself).

g22:05:55

@seancorfield thanks for letting me know this was here! i double checked and indeed i did have that rewrite flag enabled. do any other profiling tools stand out that might be helpful in pinpointing where this extra time is coming from?

g22:05:02

i must say i echo your sentiments on jdbc…

seancorfield22:05:24

I believe when the issue was diagnosed, it was done via some level of query logging in PostgreSQL...

seancorfield22:05:32

Let me pull up the JIRA ticket for that...

seancorfield22:05:10

So that's how the MySQL behavior was diagnosed (and, in that case, the version of MariaDB initially in use did not even support the correct option!).

seancorfield22:05:51

I don't remember how the original user diagnosed it with PostgreSQL but I assume it was at the DB log level. I don't use PG so I can't offer any help there.

seancorfield22:05:29

That would be the first step: verify whether you're actually getting a single insert or multiple inserts at the DB level.

seancorfield22:05:53

If you're getting multiple inserts, then maybe you are not specifying the rewrite flag correctly?

seancorfield22:05:09

Or you're using a version of the DB driver that doesn't support that flag?

g22:05:13

ok, makes sense.

seancorfield22:05:20

There are, unfortunately, so many variables 😞

g22:05:43

love it!

seancorfield22:05:13

Maintaining clojure.java.jdbc (and, now, next.jdbc) for eight years has been a nightmare at times! 🤯

g22:05:07

wow. i was wrong about having that flag enabled. good times

g22:05:24

time to recaffeinate, clearly

seancorfield23:05:20

So you now see a single, fast insert @gtzogana?

g23:05:25

yessir.

seancorfield23:05:33

Awesome! 💯

g23:05:39

thanks for the insight