RE: IDS7.3 - Compared costs between CHAR and VARCHAR ?
Posted in 2000
The following are what I consider. 1. Will making an item a VARCHAR increase the number records which on average be stored on a page. 2. What are the chances of the column expanding and causing remainder pages or rearrangement of data on the page. I have never really considered the time it takes to strip the blanks off of the character field vs. the overhead which is incurred for a VARCHAR. I would imagine the time taken to strip blanks to be insignificant in comparison to everything else which is done to retrieve a row, but havent tested this theory.(When I get another test box I have put it on my list of things to benchmark) Hope this helps, Will >===== Original Message From Arnaud ANDRIEUX <arnaud.andrieux@aql.fr> ===== >Hi all, > >I read a few weeks ago a discussion on differencies between CHAR and >VARCHAR column. I'd like to have more comparative information between >these two types of data. > >The problem I am dealing with is quite simple : > >I have a string data which can be 15, 16 or 17 characters long. Today, I >store it in a VARCHAR(17) column. But I 'm wondering if it would be >better to store it in a CHAR(17) column, cause my table will grow about >2 500 000 rows per month. Wich solution has the minimum impact on IDS >perfs ? Managing the VARCHAR (2 more bytes to store and read) or >deleting blanks in strings when reading from a CHAR coloumn ? > >Is there any comparative study somewhere on this topic ? > >I use IDS 7.31 TC2 on NT4.00 SP5. > >TIA for your help. > >-- >- -------------------------------------------------------------- - >- Arnaud ANDRIEUX arnaud.andrieux@aql.fr - >- Ingenieur en developpement - >- Direction Metier Industrie - >- -------------------------------------------------------------- - >- ALLIANCE QUALITE LOGICIEL http://www.aql.fr - >- Rue de la Chataigneraie - >- B.P. 127 - >- 35513 CESSON SEVIGNE - >- tel : (33) (0)2.99.12.50.00 - >- fax : (33) (0)2.99.63.70.40 - >- -------------------------------------------------------------- - ------------------------------------------------------------ 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/ ------------------------------------------------------------