The query should only be looking at the id_amylogen index. Nothing else in the database file should matter. And the "PRAGMA quick_check" shows that the index is well-formed. Please verify the first sentence of the previous paragraph by sending us the output of: > ~~~ EXPLAIN QUERY PLAN select count(*) from combination7 where amylogen < 0.5; EXPLAIN select count(*) from combination7 where amylogen < 0.5; ~~~ What happens if you DROP all indexes other than id_amylogen? Do you still get the error then? Can you run VACUUM after DROPPING all indexes other than id_amylogen? If you are still getting the error after dropping unused indexes and running VACUUM, how big is the database file then? Is it small enough to send me a copy?