Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to retrieve the Binary Image from database with out affecting database performance Expand / Collapse
Author
Message
Posted Tuesday, July 2, 2013 5:50 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 10:49 PM
Points: 90, Visits: 388
Hi,
We have to retreive the Binary Images from SQL Server 2005 database with out affecting the database performance. Which is best way to retrieve the Binary Image data in SQL Server 2005?

Thanks in advance ,
Ram
Post #1469417
Posted Tuesday, July 2, 2013 6:08 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:07 PM
Points: 12,910, Visits: 32,028
well, if you are in SQL2005, you cannot take advantage of the FileStream data type.

In that case, best practice depends on the size of the files you want to store. Moving gigs of data, regardless of where it's stored, takes time, so you want your application to have a strategy to minimize unnecessary downloads (ie download a whole table, but it shows one record at a time, and the user might scroll thru a dozen records)

As Far As I know, retrieving data from disk is is faster directly from the disk, without adding the overhead of SQL to retrieve the data; As a result, most times the database might have the path to the file and the filename, rather than the binary of the file itself.

If you could go to SQl2008 and use filestream, I believe there are articles stating that Filestream becomes more advantageous at a certain file size? 2meg? gotta google that)

I've placed tens of thousands of Icons into a database before,and the advantage there was they were small enough in size they didn't adversely affect performance too much; the other advantage was it was a little easier to find duplicate icons with the same name (i used grouping by file size + binary_checksum);

if the files are documents, you can use full text indexes on them and scan the file contents...but i think you can do that even if they are disk-based files as well? or is that only a third party control?


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1469431
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse