3 ms·
Or just having any long OLAP queries mixed into your OLTP workload. A readers-writer lock can often end up with tons of writers waiting on one last long read to
by derefr 4y ago
Or just having any long OLAP queries mixed into your OLTP workload. A readers-writer lock can often end up with tons of writers waiting on one last long read to drain.
- manigandham 4y agoSQLite WAL mode means readers and writer don't block each other: https://www.sqlite.org/wal.html https://www.sqlite.org/wal.html Since it's SQLite, it's also trivial to just copy the database file as a snapshot for separate OLAP queries if necessary.
- derefr 4y agoNot all OLAP queries are for reporting. Sometimes they drive OLTP processes — really complex, separate-statements but same-transaction equivalents to "INSERT/UPDATE/DELETE ... WHERE" queries. Of course, you can still drive those using a separate snapshot for the read side, to generate an ID set for a follow-up write on the business layer. But now you're doing CQRS — less trivial. You're not getting any of the ACID benefits of doing the OLAP and OLTP queries together in a single transaction; so your data model has to be designed for that (by e.g. having all tables be temporal tables.)