internal representation of varchar type in MySQL -


i wondering how mysql stores varchar type under hood? stored off table separately or stored fixed size field (something 2 byte unicode array)?

varchar variable length field that's stored in row itself. it's stored in whatever character set employ, utf-8 if you're going sensible default.

remember length of field maximum, not fixed size. varchar(255) can store 255 characters, in mysql translates 255 3-byte utf-8 sequences, or 765 bytes total.

text , blob type fields stored in separate area of table.

see more in data types documentation.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -