A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
use of char versus varchar
Joined: May 10, 2005
May 26, 2005 16:59:00
we are performing a batch operations of insert and update . The volume of records is around 500,000. We found that the performance degrades if we use char against varchar in the tables.why is it so and What is the best practice ?
Joined: Feb 02, 2002
May 26, 2005 22:22:00
Probabely because, CHAR uses fixed sizes. Which means, for example, if you store 'ABCD' in a CHAR(50) field, it will be stored as 'ABCD' padded with 46 spaces.
The future is here. It's just not evenly distributed yet. - William Gibson
Joined: May 26, 2003
May 28, 2005 12:44:00
More specifically, this means that you can get less database rows per block of memory. The computer has to read from disk more times to get the same number of results.
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
subject: use of char versus varchar
prepared statement and DB field char
cmp sql char type
why we should use CHAR type when we have VARCHAR?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014