Eric: Can you please recompile the SQLite shell (sqlite3.exe) with -DSQLITE_DEBUG and -DSQLITE_ENABLE_WHERETRACE and then run your query after first running
.wheretrace 0xff And then send us the output? (In order for this to work, you'll have to build your virtual table implementation as a shared library/DLL and load it using the ".load" command.) If you cannot easily run your query from sqlite3.exe, then please recompile your application using -DSQLITE_DEBUG and -DSQLITE_ENABLE_WHERETRACE and then run: extern int sqlite3WhereTrace; sqlite3WhereTrace = 0xff; Right before you run the problem query. -- D. Richard Hipp drh at sqlite.org