12 messages in com.mysql.lists.clusterRe: Row Size Calculations
FromSent OnAttachments
Adam Dixon26 Jul 2005 21:44 
Matthew Glubb27 Jul 2005 01:39 
Mikael Ronström27 Jul 2005 01:51 
Matthew Glubb27 Jul 2005 01:58 
Mikael Ronström27 Jul 2005 02:02 
Mikael Ronström27 Jul 2005 02:08 
Matthew Glubb27 Jul 2005 02:09 
Matthew Glubb27 Jul 2005 02:12 
Mikael Ronström27 Jul 2005 03:42 
Mikael Ronström27 Jul 2005 03:44 
Adam Dixon27 Jul 2005 19:58 
Mikael Ronström28 Jul 2005 02:34 
Subject:Re: Row Size Calculations
From:Matthew Glubb (ma@onspeed.com)
Date:07/27/2005 02:12:12 AM
List:com.mysql.lists.cluster

Excellent. Its all becoming clear :)

Would you say then that there is no advantage in using VARCHAR over CHAR's?

Matt

Mikael Ronström <mik@mysql.com>, Wednesday, July 27, 2005 wrote:

Yep, VARCHAR's are possible but will internally be treated as fixed size CHAR's where we have two extra bytes for the length.

28+2 = 30 and 30 aligned to 4 byte boundary is 32 bytes, so yes VARCHAR(28) would occupy 32 bytes and an VARCHAR(31) would occupy 31+2 = 33 bytes aligned to 36 bytes.

m a t t h e w g l u b b

____ ONSPEED - Wake up your internet

Tel: +44 (0) 2079 524 035 Fax: +44 (0) 8707 051 393 Txt: +44 (0) 7800 140 877 Web: <http://www.onspeed.com/>

PLEASE NOTE ONSPEED IS NOT LIABLE FOR ANY DAMAGES, MALFUNCTION, OR LOSS OF DATA, CAUSED AS A RESULT OF FOLLOWING ADVICE ENCLOSED BY THIS EMAIL. ANY CHANGES SHOULD BE CARRIED OUT AT YOUR OWN RISK.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. The opinions expressed in this mail are those of the author and do not necessarily represent the views of the company. If you have received this email in error please notify <serv@onspeed.com>