PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > from 'image' to 'varbinary(max)'
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
from 'image' to 'varbinary(max)'

Réponse
 
LinkBack Outils de la discussion
Vieux 01/04/2008, 18h23   #1
Gilad
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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.
  Réponse avec citation
Vieux 01/04/2008, 23h38   #2
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: from 'image' to 'varbinary(max)'

Gilad (gilad.kapel@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, esquel@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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h27.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07451 seconds with 10 queries