Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"SQLITE Full" exception

Tags:

java

sqlite

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.

like image 991
Pedro Alves Avatar asked Oct 26 '25 14:10

Pedro Alves


1 Answers

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).

like image 68
Colleen Avatar answered Oct 29 '25 02:10

Colleen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!