473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

About row size or length in mb or kb of a table

i created a table 'test' and with one column named with
ename varchar(20). it has two rows. now what my question is how i can calculate the row size or length (in kb or mb). can anyone tell me based on this example?
Mar 16 '08 #1
2 2246
ck9663
2,878 Expert 2GB
i created a table 'test' and with one column named with
ename varchar(20). it has two rows. now what my question is how i can calculate the row size or length (in kb or mb). can anyone tell me based on this example?
try using this

-- CK
Mar 17 '08 #2
deepuv04
227 Expert 100+
i created a table 'test' and with one column named with
ename varchar(20). it has two rows. now what my question is how i can calculate the row size or length (in kb or mb). can anyone tell me based on this example?
Hi,
you can also use the following query

Expand|Select|Wrap|Line Numbers
  1. select 
  2.     sys.objects.[name], 
  3.     sys.objects.[object_id], 
  4.     count(sys.columns.[name]) As ColumnCount, 
  5.     sum(sys.columns.max_length) As MaxLength
  6. from 
  7.     sys.objects 
  8.     inner join sys.columns on sys.objects.object_id = sys.columns.object_id
  9. where 
  10.   sys.objects.[name] = Table_Name
  11. group by 
  12.     sys.objects.[name], 
  13.     sys.objects.[object_id]
  14.  
Mar 17 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Frank Abel Cancio Bello | last post by:
Hi all! I need know the size of string object independently of its encoding. For example: len('123') == len('123'.encode('utf_8')) while the size of '123' object is different of the size of...
7
by: Jon | last post by:
Hi, I have table text set to 85%, I may change that to em's but for now haven't If I have a table nested within the table I get font size of 85% of 85% = 72% - too small. Without...
7
by: sql-db2-dba | last post by:
Does DB2 just fudge it when it is an empty table? Is there a "formula" for average row size when you have variable length records. Or you really have to know what your application is packing into...
1
by: Richard | last post by:
I have a table that is about 100 rows long and within that table I have tons of links. The table takes about 2 seconds to load. I think javascript might help somehow. The problem is that in...
4
by: Yaro | last post by:
Hi, I am looking for information how calculate size of table with BLOB field. After RUNSTATS command select fpages * tablespace pagesize - gives me only 16kB (table contain about 10M) I...
5
by: Kouisawang | last post by:
Example code: -------------------------------------------------------------------------------- class Foo{ private: double a; int b; };...
1
by: chitranjan | last post by:
hi all I do'nt have to much idea about postgreSQL.I just want to know. Can we give the size for a particular table / database at the time of table / database creation by the command...
2
by: Woody Ling | last post by:
I am now using db2 v8.2 64bits without DPF. I want to create a very large table which is about 1000G and the record length is suitable for 32K page size. I find in the manual that the maximum size...
0
by: VickyC | last post by:
Good Afternoon, I wonder if someone can help, I have created a bill template, that inserts Costs and Disbursements - text, amount and VAT in the relevant areas, once they have added this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.