表的列数如何影响性能

[复制链接]
查看11 | 回复4 | 2012-5-21 10:19:41 | 显示全部楼层 |阅读模式
How number of columns affects performance ?[size=0.95em]Posted by peter | Vote on Planet MySQL
It is pretty understood the tables which have long rows tend to be slower than tables with short rows. I was interested to check if the row length is the only thing what matters or if number of columns we have to work with also have an important role. I was interested in peak row processing speed so I looked at full table scan in case data fits in OS cache completely. I created 3 tables – First containing single tinyint column which is almost shortest type possible (CHAR(0) could be taking less space), table with 1 tinyint column and char(99) column and table with 100 tinyint columns. The former two tables have the same row length but have number of column different 50 times. Finally I have created 4th table which is also 100 columns but one of them is VARCHAR causes raw format to be dynamic.
[read more...]
mysql的知识可能对Oracle也适用
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
make a mark
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
mark
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
一个row piece 可以存储256 columns,如果超过这个数,则产生chain,那是不是256是个影响的阀值?
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
学习
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行