SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to retrieve the Binary Image from database with out affecting database performance


How to retrieve the Binary Image from database with out affecting database performance

Author
Message
sram24_mca
sram24_mca
Say Hey Kid
Say Hey Kid (692 reputation)Say Hey Kid (692 reputation)Say Hey Kid (692 reputation)Say Hey Kid (692 reputation)Say Hey Kid (692 reputation)Say Hey Kid (692 reputation)Say Hey Kid (692 reputation)Say Hey Kid (692 reputation)

Group: General Forum Members
Points: 692 Visits: 508
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
Lowell
Lowell
SSC Guru
SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)

Group: General Forum Members
Points: 93681 Visits: 41179
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
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search