473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

from 'image' to 'varbinary(max)'

Hi

I moved to SQL Server 2005 (from 2000) and noticed there is a better
variable to deal with binary arrays.
I hava a table that hold 9 columns of images (BLOB). each array has a
different size and can be larger than 4k.
I've changed the column data type from image to varbinary(max).
After the chnage, the size of the table grew from 22MB to 26MB.
Any idea why? I though the new variable should be better.

I have another table where there are 3 columns with binaries, the size
of the arrays there is much smaller and vary from 32bytes to 150bytes
long. when I changed the data type to varbinary the size of the table
shrunk by half!!

now I'm completely confused...

Gilad.
Apr 1 '08 #1
1 13970
Gilad (gi*********@gmail.com) writes:
I moved to SQL Server 2005 (from 2000) and noticed there is a better
variable to deal with binary arrays.
I hava a table that hold 9 columns of images (BLOB). each array has a
different size and can be larger than 4k.
I've changed the column data type from image to varbinary(max).
After the chnage, the size of the table grew from 22MB to 26MB.
Any idea why? I though the new variable should be better.
varbinary(MAX) is better than image, because you can work with just like
you work with regular varbinary, while image has a lot of restrictions
and drives you to complex operations like READTEXT and WRITETEXT.

I can't tell why your table increased in size, but since 26 MB is still
a small table, I would not bother.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Apr 1 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: | last post by:
Hi all, is there a better way to stream binary data stored in a table in sql 2005 to a browser in .net 2.0? Or is the code same as in .net 1.1? We noticed that in certain heavy load scenarios,...
2
by: Bill Nguyen | last post by:
I need sample code to insert binary file (mappoint map file) into a varbinary column using VB.NET. Please help! Thanks Bill
5
by: aamircheema | last post by:
Hi, Say I have a table Job with columns name, date, salary . I want to get the name ,date and salary for the date when that person earned maximum salary. I am using something like SELECT...
1
by: manmit.walia | last post by:
Hello All, I am stuck on a task that I need to complete. What I have is a SQL 2005 DB running with a Table called Docs. The table structure consists of the following: Table Structure for Docs...
15
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, This is being called in a C# loop within an ado.net transaction from C# 1.1 code. It is used to write large file data to a SQL Server database in chunks, rather than in one go. I had the...
2
by: tindersticks | last post by:
Hi Can someone please post the simplest script that will allow an asp page read and write to/from m a MS SQL varbinary(max) field. ie image or doc/pdf etc is converted to relevant format and...
4
by: Martin Horst | last post by:
Hi, I've got an application which is written in .Net 1.1. When I try to write a varbinary(max) field using the SqlCommand and SqlParameter classes I got an exception like this: "The...
1
by: quartrj | last post by:
For number of security reasons I can't use the Openrowset - Bulk option does any know of another way to load files into this data type.
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.