dbTalk Databases Forums  

Trimming Varchar data necessary?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Trimming Varchar data necessary? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Justin Doh
 
Posts: n/a

Default Trimming Varchar data necessary? - 10-05-2005 , 05:21 PM






I am wondering whether Trimming Varchar data is good for the space issue in
database or overload (bad) for the I/O?

Any suggestion?


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Trimming Varchar data necessary? - 10-05-2005 , 05:44 PM






There is an overhead to using varchar data but it really depends on the
characteristics of your data as to whether you use it or you allocate a
fixed length. ANSI_PADDING also has an effect on this
(http://msdn.microsoft.com/library/de...-set_2uw7.asp).
You might also want to take a look here
http://groups.google.com/groups?sour...ar&sa=N&tab=wg


Allan

"Justin Doh" <Justin Doh (AT) discussions (DOT) microsoft.com> wrote


Quote:
I am wondering whether Trimming Varchar data is good for the space issue
in
database or overload (bad) for the I/O?

Any suggestion?


Reply With Quote
  #3  
Old   
Justin Doh
 
Posts: n/a

Default Re: Trimming Varchar data necessary? - 10-05-2005 , 06:02 PM



Thank you Allan for the reply.
I am particularly interested in Trimming of Varchar or Trimming of Char.
What is your thought on that?

I would appreciate.

"Allan Mitchell" wrote:

Quote:
There is an overhead to using varchar data but it really depends on the
characteristics of your data as to whether you use it or you allocate a
fixed length. ANSI_PADDING also has an effect on this
(http://msdn.microsoft.com/library/de...-set_2uw7.asp).
You might also want to take a look here
http://groups.google.com/groups?sour...ar&sa=N&tab=wg


Allan

"Justin Doh" <Justin Doh (AT) discussions (DOT) microsoft.com> wrote in message
news:89BC1C40-C414-45CC-BDC9-C29BF66DF18C (AT) microsoft (DOT) com:

I am wondering whether Trimming Varchar data is good for the space issue
in
database or overload (bad) for the I/O?

Any suggestion?



Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Trimming Varchar data necessary? - 10-05-2005 , 06:14 PM



If it is a feature of my data that the data sizes vary in many cases
then I would go with varchar and I do not think I have ever trimmed the
data as it went anywhere. This should all be handled for you in a
varchar. What is the cost of all this trimming? I would test your
theories on real datasets and base your decision from that.

Come back and let us know though.

Allan


"Justin Doh" <JustinDoh (AT) discussions (DOT) microsoft.com> wrote


Quote:
Thank you Allan for the reply.
I am particularly interested in Trimming of Varchar or Trimming of Char.
What is your thought on that?

I would appreciate.

"Allan Mitchell" wrote:


There is an overhead to using varchar data but it really depends on
the
characteristics of your data as to whether you use it or you allocate
a
fixed length. ANSI_PADDING also has an effect on this

(http://msdn.microsoft.com/library/de...y/en-us/tsqlre
f/ts_set-set_2uw7.asp).
You might also want to take a look here

http://groups.google.com/groups?sour...8&rls=GGLD,GGL
D:2005-33,GGLD:en&q=Index%20Performance%20Char%20vs%20Var char&sa=N&tab=w
g


Allan

"Justin Doh" <Justin Doh (AT) discussions (DOT) microsoft.com> wrote in message
news:89BC1C40-C414-45CC-BDC9-C29BF66DF18C (AT) microsoft (DOT) com:


I am wondering whether Trimming Varchar data is good for the space
issue
in
database or overload (bad) for the I/O?

Any suggestion?





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.