Conversation

I made multi-process transactions on SQLite databases of 600GiB, so I have no idea what they are talking about, but let's say I would trust SQLite more than, uh, whatever is currently failing at 17MiB.
Image
4
77
Replying to and
WAL journal mode also supports any number of concurrent readers with 1 concurrent writer. WAL makes it a great fit in many cases where you previously would have needed a database server. SQLite scales very well to fairly large amounts of data and just can't do concurrent writers.
1
1
Replying to
But even a rollback journal is not a copy of the whole database! WAL has better locking semantics, but even plain DELETE mode would work here. Also, it does serialization of concurrent writes, so unless you have a lot of parallelizable writes (not the case), it's not a problem.
1
Replying to
Yeah, it's only a copy of the pages that are being changed. It's sized based on the size of the database for efficiency, but it doesn't need to copy everything for each transaction. The traditional locking can definitely be an issue but WAL mode makes it viable in far more cases.
1
1
Replying to and
Readers and writers blocking each other is far more of an issue than writers blocking each other, since you can end up in situation where writes are never happening at all, and readers also tend to be far more numerous. Probably not a good niche for SQLite in 2009, but it's 2019.
1
Replying to
Agreed on WAL being the better option most of the time, but does TRUNCATE mode really make the journal as big as the db every time? It seems like a weird choice as no client ordinarily reads the journal, and I can't find that documented anywhere.
1
Replying to
PERSIST ends up as large as the largest transaction ever, or journal_size_limit, whichever smaller. Pretty sure SQLite would be strictly better in basically any mode than anything ad-hoc. Sigh.
1
Replying to
Yeah, no doubt about that. It's definitely wrong to say that the traditional journal mode copies the entire database for every transaction. I can see why people would have that misunderstanding though because it's true you can need up to that much space for the rollback journal.
1
Replying to and
Since it's based on pages, rather than more specific write operations, it can definitely end up being larger than people might expect though. For example, if there's a single table with 20 columns with various integers, strings, etc. and you increment an integer across each row.
1