Type question.
Moderator: General Moderators
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Type question.
Poor choice for a subject line but i hope my question explains it better. If i have a field with the type varchar 20 and the values inserted into the table are not always 20 characters long, will this cause any problems in terms of performance when retrieving the data?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Type question.
I doubt anything noticeable. I recall researching the performance difference between CHAR and VARCHAR in MySQL. I think maybe long ago there was a difference in databases, but I don't think there is any difference anymore. Maybe someone has some definitive information.
(#10850)
Re: Type question.
No it's padded I believe in the data files anyway to a fixed length.