Varchars Vs Chars - Performance
Posted in 1997
All Here are some results from a recent set of tests that we performed to compare the merits of using varchars and chars. The table shows the difference in performance of defining a column as a char instead of a varchar (positive %ages). Inserts Selects Update1 Update2 Deletes table 1 5% 2% 22% 8% -8% table 2 7% 6% 24% 8% 1% Average 6% 4% 23% 8% -3.5% All varchar columns are defined as n,0. The largest varchar column in these tables is 40 chars long. These tests would appear to show that char fields are a better bet than varchar (at least up to a column size of 40 chars). Interestingly enough, deletes were faster on the tables containing varhars. This is not the first time that I have seen tests like this support using char fields over varchars. Anybody got views/comments? Mark MarkDenham@aol.com (home) Denham.M@amstr.com (work)