?
Solved

Calculating the average row length

Posted on 2001-07-04
1
Medium Priority
?
1,176 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

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

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Suggested Courses

770 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