vlcn-io / cr-sqlite

Convergent, Replicated SQLite. Multi-writer and CRDT support for SQLite
https://vlcn.io
MIT License
2.77k stars 76 forks source link

Do not check `schema version` pragma more than once per transaction #370

Closed tantaman closed 1 year ago

tantaman commented 1 year ago

For #352 -- do not check the schema version pragma more than once per transaction.

~15% increase in speeds across the board. This is needed for the lookaside update since we check the schema pragma more often now. The reason is that we need to re-create crr prepared statements if the database schema changes since columns could have been added or removed from a crr.

We're sensitive to changes in the number of primary keys but.. anything else?