In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-10-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you what is the difference in the storage performance of null'''under Innodb. I hope you will gain something after reading this article. Let's discuss it together.
Null: differences in nullbits bitmaps.
Variable byte: one more byte.
'': the variable byte is one more byte and the actual data area is one more byte for 0X20.
The statement is as follows:
Mysql > show create table testnull1\ gateway * 1. Row * * Table: testnull1Create Table: CREATE TABLE `testnull1` (`id` int (11) DEFAULT NULL, `name` varchar (20) DEFAULT NULL, `name1` varchar (10) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin11 row in set (0.00 sec) mysql > insert into testnull1 values Query OK, 1 row affected (0.22 sec) mysql > insert into testnull1 values; Query OK, 1 row affected (0.22 sec) mysql > insert into testnull1 values; Query OK, 1 row affected (0.22 sec) mysql > insert into testnull1 values; Query OK, 1 row affected (0.22 sec) mysql > select * from testnull1 +-+ | id | name | name1 | 1 | gaopeng | gaopeng | | 1 | gaopeng | | 1 | NULL | gaopeng | | 1 | | gaopeng | + -+ 4 rows in set (0.00 sec)
The main observation is line 2, line 3 and line 4.
The second line:
07 00:2 byte variable field length, the second 00 represents the length of the name field, where the''length is 0
00: null bitmap
0000180025:fixed extrasize
0000012065100000000ec9e9b1000014210110:rowid+trx_id+rollback_ptr
80000001: data 1
67616f70656e67: data 'gaopeng'
The third line
07:1 byte variable length
02:null bitmap
0000200026:fixed extrasize
0000012065110000000ec9eeb4000014060110:rowid+trx_id+rollback_ptr
80000001: data 1
67616f70656e67: data 'gaopeng'
Fourth line
0701 2-byte variable length, 01 represents the name field length
00:null bitmap
000028ff78:fixed extrasize
0000012065120000000ec9f0b6000014040110:rowid+trx_id+rollback_ptr
80000001: data 1
20: data''
67616f70656e67: data 'gaopeng'
After reading this article, I believe you have a certain understanding of "what is the difference in the storage performance of null''under Innodb". If you want to know more about it, welcome to follow the industry information channel, thank you for your reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.