What happens to a MyISAM table with ROW_FORMAT=FIXED and varchar / text fields?

StackOverflow https://stackoverflow.com/questions/21360465

  •  02-10-2022
  •  | 
  •  

Frage

I see we can use ROW_FORMAT=FIXED when defining a MyISAM table with CREATE TABLE. But what happens when we have varchar or text fields in this table?

Are the fields forced to be technically fixed width? (Just like char in storage, which wastes disk space)

Or are they still in variable length (so as to save disk space) but we have the performance advantages of a fixed row format?

Yes? Cause' that'd be great!

War es hilfreich?

Lösung

According to official documentation if you have ROW_FORMAT=FIXED in your table all VARCHAR fields will converted to CHAR:

You can hint that you want to have fixed length rows even if you have VARCHAR columns with the CREATE TABLE option ROW_FORMAT=FIXED

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top