RE: char vs. varchar
Posted in 2000
I didn't realize that trimming was such a difficult task. I didn't have any problems doing it when I was a programmer. It didn't seem to take very long either. I would guess that with all fixed length columns it is faster to parse the values of the columns out of each row. You also avoid having to go to a remainder page because the value in the varchar grew. I have never done any benchmarking on the speed differences and do not have a box to it on at the moment, but it seems like bad form to use a varchar where a char is sufficient. Hope this helps some. Will >===== Original Message From Red Valsen <red_valsen@yahoo.com> ===== >My Java developers have been struggling mightily against character type >columns. They have been carping about the need to trim, in one way or >another, trailing blanks from all manner of values they pull from >tables. Why can't all those nasty fixed length columns be >varchar(255)? Arguments of higher overhead and storage requirements >didn't satisfy. > >Why shouldn't all those chars be varchars? And exactly what are the >higher overhead and storage requirements? ------------------------------------------------------------ This e-mail has been sent to you courtesy of OperaMail, as a free service from Opera Software, makers of the award-winning Web Browser, Opera. Visit us at http://www.opera.com/ or our portal at: http://www.myopera.com/ Your free e-mail account is waiting at: http://www.operamail.com/ ------------------------------------------------------------