在SQL Server中,如何确定每页的行数?

时间:2021-07-28 09:07:55

In SQL Server, how do you determine the (average or expected) number of rows per page?

在SQL Server中,如何确定每页的(平均或预期)行数?

I know know how to determine the average and max row size, but I don't know how that relates to actual rows/page.

我知道如何确定平均行数和最大行数,但我不知道它与实际行/页面的关系。

2 个解决方案

#1


8060 bytes per page, 8 pages per extent...remember that if you row is 4040 bytes then you can only fit one row on the page

每页8060字节,每个范围8页...请记住,如果你的行是4040字节,那么你只能在页面上放一行

DBCC SHOWCONTIG will give you how many pages your table is using

DBCC SHOWCONTIG将为您提供表格使用的页数

#2


Pages are 8K in size including a 96byte header. So if you know the row size, you could make an estimate of how many rows would fit onto the data portion of a page.

页面大小为8K,包括96byte标题。因此,如果您知道行大小,则可以估计页面的数据部分可以容纳多少行。

#1


8060 bytes per page, 8 pages per extent...remember that if you row is 4040 bytes then you can only fit one row on the page

每页8060字节,每个范围8页...请记住,如果你的行是4040字节,那么你只能在页面上放一行

DBCC SHOWCONTIG will give you how many pages your table is using

DBCC SHOWCONTIG将为您提供表格使用的页数

#2


Pages are 8K in size including a 96byte header. So if you know the row size, you could make an estimate of how many rows would fit onto the data portion of a page.

页面大小为8K,包括96byte标题。因此,如果您知道行大小,则可以估计页面的数据部分可以容纳多少行。