I have to store file data in a blob field using Firebird. Every time I execute the query, the database file size increases, even if it is executed with the same parameters.
Is it possible to avoid this problem?
update or insert into FILES(FILENAME, FILEVERSION, SHA512, FILESTATUS, FILEDATA)
values(''%s'', ''%s'', ''%s'', %d, :FILEDATA)
matching (FILENAME, FILEVERSION)
Edit: Sorry, I didn't specify the problem in detail, and I found a workaround for it: a first query examines if the file data is already stored, and the second query is executed only if it isn't. I think, it can be combined in a 'execute block' statement.