Lol my whole body clenched at the thought of having to do this.
But a derivative approach might be to store the images in a
different table of the
same database file, and link your metadata table to them, so that the metadata query results aren't clogged up with MB of image data (if that is what's happening - I thought that the result set returned is simply pointers to the records, rather than the actual data).