Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Find Empty Tables
Charles Davis wrote:
> Hi, all!
>
> I manage several SAP R/3 databases that each contain 25,000 tables and
> exceed 1TB in size. They are of both 8i and 9i versions.
>
> Does anyone have a process or query that scales up well and that can find
> tables that are empty without doing a SELECT count(*) on each of the tables?
>
> Thx.
>
> charles
SELECT owner, table_name
FROM dba_tables
WHERE num_rows = 0;
This, of course, assumes you aren't running SAP with a TB of data and have statistics.
If not ... you got bigger problems than just finding empty tables.
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Thu May 29 2003 - 21:41:17 CDT
![]() |
![]() |