Fork me on GitHub
#sql
<
2018-07-31
>
rymndhng04:07:01

we sanitize during the serialization to string, i'd like to think of it as an issue of serialization to string format and not an issue of our in-memory data structures i.e (-> some-obj json/generate-string strip-unicode-nulls)

martinklepsch07:07:19

Does anyone know when it’s right to reuse connections with SQLite? Some sources say don’t reuse, some say do, hard to find like a definitive answer that weighs the pros and cons

orestis08:07:10

SQLite doesn’t actually have connections, does it? It’s just opening a file?

orestis08:07:33

IIRC, you can read concurrently from sqlite, but writing concurrently may be dangerous.

martinklepsch08:07:34

Concurrency largely depends on the journal_mode used as far as I understand

martinklepsch08:07:22

But yeah, I’m not sure how the concept of connections maps to SQLite at all 🙈

orestis08:07:11

At the risk of remembering wrong, I think you can have even multiple processes accessing SQLite concurrently.

orestis08:07:44

I’ve used SQLite in the past from Python etc, which was using of course the C api. I’m not sure how SQLite is used from JVM…

hiredman18:07:12

I would highly recommend looking at one of the jvm embedded databases like derby over using sqlite from the jvm

martinklepsch18:08:55

I considered using HSQLDB instead of SQLite for it’s seemingly much better performance shown on this page: http://www.jpab.org/Hibernate/HSQLDB/embedded/Hibernate/SQLite/embedded.html but then got sold by reading about how SQLite is tested and proven etc. I will test that concurrent access is possible..

martinklepsch21:08:08

edit, nevermind, didn’t apply some basic optimizations and H2 seems quite fast now 🙂

hiredman18:07:53

the sqlite jdbc driver situation may have improved recently (I am not sure), but it was really bad at one point

hiredman18:07:47

regardless of if sqlite could support concurrent access, the jdbc driver wouldn't let you do that at one point

martinklepsch18:08:55

I considered using HSQLDB instead of SQLite for it’s seemingly much better performance shown on this page: http://www.jpab.org/Hibernate/HSQLDB/embedded/Hibernate/SQLite/embedded.html but then got sold by reading about how SQLite is tested and proven etc. I will test that concurrent access is possible..