Subject Re: [firebird-support] Re: Store large amount of Binary Data in FB
Author Aage Johansen
yogiyang007 wrote:
> I thank everyone who have contributed to this question.
> I really appreciate your inputs.
> I have come to the conclusion that I will create a separate table for
> storing all images so if anything does go wrong the precious data is
> not affected. I am also thinking of converting/encode each document
> to Base64 and store in FB. Hope this approach will not have any
> problems? If anyone has got any other insight on this please do help
> me out.

I wouldn't bother.
If you can find a simple and efficient method of compressing the
blobs it migth be worth considering. I haven't seen anything that
compresses "compressed tiff" in a significant way. However,
manipulating the images when you store them will make you do some
work at retrieval time - you may lose some convenience (e.g. data
aware controls)

> Aage Johansen :
>> 3. "Can Firebird handle such huge binary data efficiently?"
>> Well. I currently have a few million images (in tiff) in files with
>> references/pointers (server/folder/filename) in the database. The
>> files/folders are organized in different ways because of the source
>> system for the images - which is a pain. Now, I intend to move them
>> all into one single database. Estimated size will be around
>> 250GB. Looking forward to having the new disks installed in a SAN,
>> and getting ready to move the image files into the
>> blobs. Preliminary tests did not reveal any problems with loading
>> the db, backup/restore of the db, or retrieving data.
> This info is truly amazing. You are running FB on which OS? Coz. I
> have never been able to create such huge files in Windows XP till
> date. I do video editing at home, as hobby. But Adobe Premier just
> never seems to create files larger than 4 GB so I have to split a
> long video in chuncks of 4 GB.

The server isn't a very "hot" one: I think it is Windows 2003 (maybe
2000) server. Two (2 or) 3GHz processors, fast disks (SCSI 15000rpm)
- but the disks in the SAN may be slightly slower (SATA). 2GB RAM (I
don't think we've had memory usage peaks above 1GB). The tests used
just a small db (7-8 GB). We now run Fb/1.5.4 SS (just upgraded from
1.5.2), CPU affinity set to 1 processor (default). Database disks
are usually mirrored.
Usually there are no more than 20-40 connections to the main databases.

> Forgive me for my ignorance but what is SAN?

Martijn has given a reference.
Think of it as an external box with disks, but one or more servers
see it as increased local storage.

> Reagrding speed I have felt from the first day that I started
> experimenting on FB that whenever I run my testing software for the
> first time FB seems to take a bit longer to server data but after
> this single delay everything seems to work well and data comes in a
> ziffy!. By the way our company's Data Server is Intel C2D with 2 GB
> RAM and 2x 160 GB HDDs and our LAN is just of 30 nodes.

Fast disks can be important. For some years 15000 rpm has been the
fastest rotation - is there anything faster now?
Your RAID controller might also help (with caching).

> Thank you all for your tips, hints, scoldings and guidance.
> Yogi Yang

Aage J.