GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Certification  >  Oracle  >  Oracle Developer
Go To First  |  Previous Question  |  Next Question 
 Oracle Developer  |  Question 17 of 23    Print  
what is the syntax to get size of defined table?

  
Total Answers and Comments: 4 Last Update: August 21, 2006     Asked by: prasan 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Padmanathan
 

Hi,

select owner, segment_name,bytes/1024/1024 "Size in Mb" from dba_segments where segment_type=<TABLE_NAME>

This is total size physicall occupied

for actual size:

Analyze the table first using DBMS_STATS package and run the follwoing command.

select table_name, num_rows* avg_row_len  from dba_tables where table_name=<TABLE_NAME>

for accurate you can include pctfree parameter also.

Padmanathan



Above answer was rated as good by the following members:
Priyanka84
April 19, 2006 07:35:43   #1  
vaibhav        

RE: what is the syntax to get size of defined table?
create table tablename(row column)
 
Is this answer useful? Yes | No
May 06, 2006 00:11:57   #2  
ravi        

RE: what is the syntax to get size of defined table?

It bytes column is available in user_extents view.

select sum(bytes) from user_extents group by 1


 
Is this answer useful? Yes | No
May 11, 2006 07:34:46   #3  
harsha        

RE: what is the syntax to get size of defined table?
how to get the size of the specified table i.e for a particular table??
 
Is this answer useful? Yes | No
August 20, 2006 12:09:29   #4  
Padmanathan        

RE: what is the syntax to get size of defined table?

Hi

select owner segment_name bytes/1024/1024 Size in Mb from dba_segments where segment_type <TABLE_NAME>

This is total size physicall occupied

for actual size:

Analyze the table first using DBMS_STATS package and run the follwoing command.

select table_name num_rows* avg_row_len from dba_tables where table_name <TABLE_NAME>

for accurate you can include pctfree parameter also.

Padmanathan


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape