Re: blob: file vs. memory
Posted in 1997
>From: olded@ix.netcom.com (Ed Schaefer) >Date: 3 Apr 1997 01:08:22 GMT >X-Informix-List-Id: <news.36113> > >Let me ask a possible nebulous question: In Informix 4GL is it more >efficient to LOCATE a BLOB data type to MEMORY or to a system FILE? >It's seems reasonable to think MEMORY is the most efficient, but I've >had very little experience with this. > >I have a client who presently is LOCATEing to a FILE and I'm just >wondering if it's worth the effort to change it. I know there are >several 4GL callable "C" functions I'll have to modifify. It depends on what you're going to do with the contents. If you're going to us a program on them, then when the program is run, it is going to need the blob in a file, so you might as well locate the blob in the file to start with. If, on the other hand, your I4GL program is going to call some C code to fiddle with the contents of the blob and it is designed to handle a blob in memory rather than a blob in a file, then it will be more efficient to use a blob located in memory. And if your machine supports memory mapped files (it probably does if it is Unix), then you could arrange to map the blob-in-file into memory, thus getting the best of both worlds. Probably. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>