I am trying to query a table that has a blob column, and need to filter the results to only provide rows that have content (any content) in the blob column.
However, doing SELECT column_name FROM table_name WHERE blob_column IS NOT NULL
takes a long time, which I assume is due to the fact that some of the blobs are quite heavy. It seems that the WHERE clause is reading the entire content of the blobs and comparing them to null
.
Is there a way to test whether a blob column is null or not, without having sqlite read the entire contents of the blob?