Re: Storing image as BLOB or as file in filesystem?
Posted in 1998
It is much more efficient to store image data in BLOB columns, that are stored in a BLOBSPACE (not a DBSPACE). It is important that you choose a suitable blob page size. Say for instance you are going to store document images .TIF files in the database, and they range in size from 17k to 28k, but 90% of the documents are 22k (typical A4 compressed), then you choose a blob page size of 23k. Informix will need a single BLOB read to retrieve 90% of your images. Database can store an unlimited no of images. File System directories are linear, and are very slow when directories (folders) contain more that a few thousand files. A folder containing 400,000 image files will go 'bannanas', Unix, FAT, or even NTFS. Some Unix's can't handle more that 65k files in one directory. Databases can handle ten or millions with no significant retrieval degradation.