GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  Oracle

 Print  |  
Question:  i am creating one table in oracle. in database it is allocated some memory for that table. how can i know how much memory that table is holding in that database?



March 03, 2006 03:52:24 #1
 Guna Sagar Challa   Member Since: Visitor    Total Comments: N/A 

RE: i am creating one table in oracle. in database it...
 

Hi,

Using the below query u can find exactly how much space has been eaten up on the disk by your table:

select bytes from user_segments where segment_name = <table name>;

or by using the following query to know actually how many bytes data is stored in the table

select sum(vsize(col1) + vsize(col2) + vsize(col3) +........+ vsize(coln)) from <table_name>;

eg: to find the number of bytes of data in dept table use the following query

SELECT SUM( VSIZE(deptno) + VSIZE(dname) + VSIZE(loc) ) FROM scott.dept;

Guna Sagar Challa

     

 

Back To Question