News for hackers. Stuff that matters.

rc48

Re:Many small queries are efficient in SQLite on Thursday February 18, 2021 @04:15AM (#26177670)
+1. I was not aware of the 'stickiness' of the wal pragma. Thank you for the tip. I will be defaulting to this going forward. For a quick confirmation, I used:

  $ f=$(mktemp)
  $ sqlite3 $f "pragma journal_mode"
  delete
  $ sqlite3 $f "pragma journal_mode=wal
  wal
  $ sqlite3 $f "pragma journal_mode"
  wal
Edit: struggling to format code markup correctly on my mobile.
Re:Many small queries are efficient in SQLite on Thursday February 18, 2021 @03:59AM (#26177550)
My sentiments exactly!
Re:Many small queries are efficient in SQLite on Thursday February 18, 2021 @03:57AM (#26177541)
Same as @mikeyjk! Can you point toward more information on this topic? The applications I'm dealing with in my day job are constantly plagued by deadlocks in the database surrounding bulk transactions. I've theorized that a "T1 1-many T2" refactoring of the tables - like what you've described - might be a solution , but haven't settled on how to implement. Would absolutely love to learn more on this esoteric, hard-to-google topic.