views:

266

answers:

2

I have an ASP.NET application (vb.net codebehind) that has serious performance problems because of its storage of TIFF files in one server share. There are over a million .TIF files there now! The application tracks the scanned images of property with a corresponding row in an Oracle database table. We have this idea that it might be better to store the images themselves in a new Oracle table. How can this be done?

The alternative solution we are thinking of is to split up the server share into multiple folders by State (an OH folder, a WV folder, a VA folder, etc.) Seems like the database option might make more sense long-term, but how do we do it? Can a TIFF be stored in a BLOB column and then extracted back into TIFF format using .NET? Anyone know how?

+3  A: 

Yes, you can store a TIFF file in Oracle's BLOB data type.

Check out this link to get BLOB field contents with ADO.NET.

Pablo Santa Cruz
I didn't code it with a dataset the way the example is, but tried to code this as a call to a package's stored procedure passing a byte array with the TIFF file through a parameter. Was able to store only 1 byte of the byte array - when I passed no length in the Oracle parameter to the stored proc. Adding a length gives me an error. Every other combination on the parameter to the blob threw errors. The error indicates an incompatible or unreasonable conversion (can't remember the exact wording now). I tried both ODP.net and the Microsoft Oracle DataProvider. I've given up on Blob for now.
Greg
A: 

Besides from storing in a database, if you separate groups of one thousand files in different folders, performance should increase a lot. Folders with a very high number of files get a severe downgrade in performance when in a windows enviroment

kurast