Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Find Empty Tables

Re: Find Empty Tables

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Thu, 29 May 2003 19:41:17 -0700
Message-ID: <3ED6C4CD.9D1762CE@exxesolutions.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US