当前位置:网站首页>Why is varchar (255) defined in MySQL?
Why is varchar (255) defined in MySQL?
2022-07-22 13:40:00 【sodawoods】
stay 4.0 Version below ,varchar(255) refer to 255 individual byte , Use 1 Bytes Storage length is enough . When it is greater than or equal to 256 when , To use 2 Bytes Storage length . So define varchar(255) Than varchar(256) Better .
But in 5.0 Above version ,varchar(255) refer to 255 individual character , Each character may occupy more than one byte , For example, using UTF8 Each Chinese character occupies 3 byte , Use GBK Each Chinese character accounts for 2 byte .
NOTE: In the production environment, we usually use utf8mb4 Character set .
边栏推荐
- leetcode-140:单词拆分 II
- Small knowledge points with notes
- 617. Merge binary tree
- 直播回顾| Apache Pulsar Meetup 精彩回放(含 PPT 下载)
- leetcode-307:区域和检索 - 数组可修改
- Database expansion can also be so smooth, MySQL 100 billion level data production environment expansion practice
- Apachecon Asia 2022 opens registration: pulsar technology issues make a big debut
- LeetCode_动态规划_困难_44.通配符匹配
- Mysql8 stored procedure generates calendar table and exception handling
- Service (LB) and managed pod
猜你喜欢
海量 Region 集群调优最佳实践
自动化测试简历编写应该注意哪方面?有哪些技巧?
Live review | wonderful playback of Apache pulsar meetup (including PPT download)
How to set the screen not to turn off after locking the screen in win10
ideal关于 log显示问号且双击无法打不开的解决方法
leetcode-6119:元素值大于变化阈值的子数组
数据库扩容也可以如此丝滑,MySQL千亿级数据生产环境扩容实战
Apachecon Asia 2022 opens registration: pulsar technology issues make a big debut
Idea décompile toute la source du paquet jar
QT program packaging and publishing method (using the official windeployqt tool)
随机推荐
麒麟系统 QT代码 出现 使用未声明的标识符“MainWindow“
2022.7.21-----leetcode. eight hundred and fourteen
[PostgreSQL 15] PostgreSQL 15 improves unique and null
带你刷(牛客网)C语言百题(第三天)
leetcode-6119:元素值大于变化阈值的子数组
【C】信息管理系统/通讯录通用模板(介绍静态、动态、文件三个版本)
Leetcode-zj-future03: location of express transfer station
torch.jit.trace与torch.jit.script的区别
直播回顾| Apache Pulsar Meetup 精彩回放(含 PPT 下载)
谈谈实施数据治理时常犯的10大错误
FAST-LIO2: 快速且直接的激光雷达与惯导里程计
Read data nearby under the three data centers
使用 Grafana 监控 TiDB 的最佳实践
Coordinate system in QT
网络空间测绘
Idea décompile toute la source du paquet jar
Qscriptengine official documentation
[wechat applet] image image loading (78/100)
[有趣] VS Code -- Live Server的一小段代码注入
torch. jit. Trace and torch jit. Differences between scripts