SQLite Forum

Query performance regression after v3.33.0 (OP_SeekScan?)
Login
One of our clients has real-world cases that run slowly if OP_SeekScan is
turned off.  In fact, OP_SeekScan was added specifically to support that
client.  We have cases in the TH3 test suite that run more slowly when
OP_SeekScan is disabled.

If you don't want to ever use OP_SeekScan, you can now disable it at run-time
using the [SQLITE_TESTCTRL_OPTIMIZATIONS][2] [test-control][1] with a mask
of 0x20000:

>      sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, db, 0x20000);

In the CLI use this dot-command:

>     .testctrl optimizations 0x20000

If you discover a test case that runs faster with OP_SeekScan disabled,
please bring it to our attention by posting it on this forum.

[1]: https://www.sqlite.org/c3ref/test_control.html
[2]: https://www.sqlite.org/c3ref/c_testctrl_always.html