Solved

Calculating the average row length

Posted on 2001-07-04
1
1,161 Views
Last Modified: 2012-05-04
Hello experts,

I am trying to conduct a sizing exercise for my database.  I am using the tried and tested approximation that a table size is approx = num rows * average row length.

The problem is that I am struggling to figure out the average row length for the table(s).  From business predictions I can figure out the number of rows but without the avg row length I'm stuffed.

I know in Oracle I can (after running stats) select DBA_TABLES.AVG_ROW_LENGTH for just this thing - is there an easy way in SQL Server.  I have a development database which I can use for test data if only I can figure out how to do it.

Can anybody help

Regards, Meowsh
0
Comment
Question by:meowsh
1 Comment
 
LVL 18

Accepted Solution

by:
nigelrivett earned 200 total points
ID: 6253010
try sp_spaceused 'tablename'
gives no rows, data/index size
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now