开发者

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 C开发者_运维技巧hannel 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!


I'm not sure how it translates to C#, but I think an ESQL/C solution is illustrated in the ESQL/C Reference Manual Appendix C and the LO (large object) functions are listed in Appendix B, while Chapter 8 describes how to use them all.

The Informix .NET Provider Guide (manual) has a section 'Type Reference' including a description of the IfxBlob class.

With luck, one or more of these should help you find the answers you need.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜