Re: CHAR() v. VARCHAR()
Posted in 1995
In article <42pio3$n6c@cssun.mathcs.emory.edu> mstrothr@informix.com "Michael Strother" writes: > } Our DBA claims that VARCHAR() is much less efficient than CHAR(). Yet, > } he claims that both are fixed length columns with null terminated string > } data. <snip of dba's comments> > He is wrong, CHAR data types are stored in their full length in the > database table, a VARCHAR is implemented as a fixed length pointer > in the record, my experience has been that there is no appreciable > difference in performance although it could reasonably be argued that > a VARCHAR is slower due to extra disk activity... Though if the average length of the string in a CHAR is somewhat less than the max length, using VARCHAR will use less disk space, though I agree with the above that it will be a little slower on disc access. So what's more crucial - using less disc or less CPU? That is the question! -- ============================================================================ Sally Woolrich | This mail contains my personal sally@excelsis.demon.co.uk | views not those of my employer! ============================================================================