I'm working on a Java program that uses the Xerial SQLite driver to perform some queries on a huge database.
When I send the query
SELECT sequence,fieldOne,fieldTwo,pairs FROM events ORDER BY pairs DESC
where sequence is a TEXT, fieldOne, fieldTwo and pairs and integers. It takes some time and throws this exception:
[SQLITE_FULL] Insertion failed because database is full (database or disk is full)
If I add a limit constraint, it goes OK.
What is happening? This is not an insert query and disk isn't full.
SQLite is probably creating a temporary table/file because of the ORDER BY. The disk isn't full, because you're checking after it deletes the temporary file it creates. If you can't get yourself more disk space, I'd advise either batching the result or getting rid of the ORDER BY (if you can).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With