MySQL myisam dynamic tables and CHAR types

399 Views Asked by At

From the MySQL manuals I gathered that when there are VARCHAR columns in a myisam table, then the dynamic storage format will be used. However, It wasn't clear to me, if a CHAR column in the dynamic format will be handled like a VARCHAR or if it will still be fixed size (and get the performance benefits associated with that)?

I remember from some database lectures is, that variable length data is generally appended at the end of a row's fixed length data. Part of the fixed length data would be a pointer for each VARCHAR to that data. But maybe myisam doesn't work this way. So my question is: will CHAR use such a pointer or is it stored at a fixed offset so access to it is fast?

1

There are 1 best solutions below

2
On BEST ANSWER

It will be fixed to the length that you have declared when you created the table -> MySQL dynamic format

Check this question also MySQL Row Format: Difference between fixed and dynamic?