Sep 19, 2001 #1 mokesql Programmer Sep 6, 2001 30 AT hi! i want ot know if there is a select type in sql or any other statement in sql which get me the size of a table. thnx kemo
hi! i want ot know if there is a select type in sql or any other statement in sql which get me the size of a table. thnx kemo
Sep 19, 2001 #2 rcurva Programmer Jul 17, 2001 548 AU If you have access to DBA_SEGMENTS view, you can issue the following sql: -- for all tables SELECT owner, segment_name, SUM(bytes) FROM DBA_SEGMENTS WHERE segment_type = 'TABLE' GROUP BY owner, segment_name Upvote 0 Downvote
If you have access to DBA_SEGMENTS view, you can issue the following sql: -- for all tables SELECT owner, segment_name, SUM(bytes) FROM DBA_SEGMENTS WHERE segment_type = 'TABLE' GROUP BY owner, segment_name
Sep 19, 2001 #3 Wes MIS Jan 4, 1999 2 CA You may also want to use user_tables if you have updated statistics on your tables. Upvote 0 Downvote
Sep 19, 2001 #4 rcurva Programmer Jul 17, 2001 548 AU A few correction on my sql, no need of grouping the result here: SELECT owner, segment_name, bytes FROM DBA_SEGMENTS WHERE segment_type = 'TABLE'; OR SELECT owner, segment_name, SUM(bytes) FROM DBA_EXTENTS WHERE segment_type = 'TABLE' GROUP BY owner, segment_name; You can also use USER_EXTENTS view here. Upvote 0 Downvote
A few correction on my sql, no need of grouping the result here: SELECT owner, segment_name, bytes FROM DBA_SEGMENTS WHERE segment_type = 'TABLE'; OR SELECT owner, segment_name, SUM(bytes) FROM DBA_EXTENTS WHERE segment_type = 'TABLE' GROUP BY owner, segment_name; You can also use USER_EXTENTS view here.