News for hackers. Stuff that matters.
Re:SQLite Release 3.37.0 by Lio on Saturday November 27, 2021 @03:59PM (#29363389)
There’s nothing obvious is linked release but is this expected to have an affect on performance either good or bad?
Re:SQLite Release 3.37.0 by ripley12 on Saturday November 27, 2021 @04:09PM (#29363533)
I wouldn't expect much difference in performance. "The on-disk format for the table data is the same."

I would expect the additional checks on writes to be negligible in most cases (dwarfed by other bookkeeping and I/O). I imagine that strict mode could enable some optimizations for read queries, but I can't see those being huge wins.

Re:SQLite Release 3.37.0 by ComputerGuru on Saturday November 27, 2021 @04:43PM (#29363865)
> but I can't see those being huge wins.

I agree from an algorithmic perspective but in the real world, it really depends. The size of a non-text/binary cell within a column is now fixed, meaning guaranteed to never need to resize/reallocate when streaming results. That could translate to non-negligible improvements (multiple percentage point speed up) if it’s implemented separately from the existing code path.

Re:SQLite Release 3.37.0 by prirun on Saturday November 27, 2021 @06:42PM (#29364747)
> The size of a non-text/binary cell within a column is now fixed

I think this is not true since the on-disk format didn't change, ie, ints are still variable-size whether strict or not.

Re:SQLite Release 3.37.0 by ComputerGuru on Sunday November 28, 2021 @11:13AM (#29370016)
The format/spec doesn’t change, the implementation does. “This field can be variably sized” vs “but in practice since this is a strict table it will always be exactly n bytes”
Re:SQLite Release 3.37.0 by ComputerGuru on Saturday November 27, 2021 @04:21PM (#29363669)
It’s really no more than an additional (hyper optimized) check constraint on the type; with branch prediction it’s probably ~free.
Re:SQLite Release 3.37.0 by SQLite on Sunday November 28, 2021 @03:57PM (#29372930)
The SQLite dev's internal performance testing using cachegrind shows that STRICT mode uses about 0.34% more CPU cycles. So STRICT is slightly slower, but not enough that you could measure the difference reliably in a real-world system.