| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Find Empty Tables
Charles
You could try SELECT 'X' FROM DUAL WHERE EXISTS( SELECT 'X' FROM table).
Oracle optimises EXISTS such that it only finds the first row before ending that query (the subquery in the case above). If the select above (whole statement) returns 'X' (you could 1 or NULL or whatever it's trivial and irrelevant in the grand scale of things) then you have a non empty table.
Andy
"Charles Davis" <cdavis10717_at_comcast.net> wrote in message
news:3_Sdnd6lkMjJLEujXTWcqw_at_comcast.com...
> 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
>
>
Received on Fri May 30 2003 - 04:16:26 CDT
![]() |
![]() |