Search code examples
c#databaseblobinformixchunking

Appending to Informix BLOB without running out of memory


I'm writing a c# app that inserts a large (1GB+) amount of data into a BLOB in an informix database.

However, many times the file is too large and the process runs out of memory. I have implemented the WCF Chunking Channel to mitigate this, but I need to put these chunks into the BLOB without consuming memory to store them all.

How might I go about appending these chunks to the blob as they come in instead of buffering them all in memory first?

TIA!


Solution

  • as it turns out, the IfxBlob classes Write method seems to write it directly to a LOB on the database server and seems to skip memory entirely, so there was no need for anything crafty.