Which one is better: CHAR or VARCHAR?

2004-01-12 Thread Hassan Shaikh
Hi, I've a column of type VARCHAR(10) where I know the data would be 10-char in length - always. Apart from the fact that VARCHAR saves space as compared to CHAR, is there any performance benefit? If yes, is it significant enough? Thanks. Hassan

Re: Which one is better: CHAR or VARCHAR?

2004-01-12 Thread robert_rowe
Char is more efficient when selecting but less efficient when storing (wastes space). It is a trade off so there really isn't a right answer. Do some experimenting and see what works best for you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Which one is better: CHAR or VARCHAR?

2004-01-12 Thread Nitin Mehta
If the data is 10-char in length always, CHAR is better performance-wise. - Original Message - From: Hassan Shaikh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 11, 2004 6:34 PM Subject: Which one is better: CHAR or VARCHAR? Hi, I've a column of type VARCHAR(10) where

Re: Which one is better: CHAR or VARCHAR?

2004-01-12 Thread Matt W
improvement. Of course, if you have other variable length columns in your table, MySQL will be stupid and change your CHAR to VARCHAR, thinking it's helping you. :-( Matt - Original Message - From: Hassan Shaikh Sent: Sunday, January 11, 2004 7:04 AM Subject: Which one is better: CHAR