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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How do I find emty tables

Re: How do I find emty tables

From: Niklas Danielsson <niklas.danielsson_at_eget.fi>
Date: Wed, 16 May 2001 11:32:10 +0300
Message-ID: <3B023B0A.F7C714AA@eget.fi>

OK, thanks for all your answers. I think that I have a way of dealing with this problem now.

/Niklas

Boris Bunjan wrote:

> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message
> news:tg2sksbb43016c_at_beta-news.demon.nl...
> >
> > "Niklas Danielsson" <niklas.danielsson_at_eget.fi> wrote in message
> > news:3B0106D8.C42783C_at_eget.fi...
> > > Hello all!
> > >
> > > I would like to find alla tables that are emty = 0 rows in the database.
> > > The problem is that I can't analyze the the tables so I can't use
> > > NUM_ROWS in DBA_TABLES.
> > >
> > > Is there any other way?
> > >
> > > TIA
> > >
> > > niklas.danielsson_at_eget.fi
> > >
> >
> > If you don't want to do it the easy way, you obviously need to resort to
 ...
> > select count(*) from <table>
> > and then a series of them.
> >
> > You could of course filter out all tables with more than 1 extent (they
> > likely don't need to be counted), but the rest ... no other solution.
> > Yes, it will be slow, as the non-empty tables will be counted.
> >
> > Regards,
> >
> > Sybrand Bakker, Oracle DBA
> >
> >

>

> Just to add some speed:
> select count(*) from <table> where rownum=1
>
> Boris
  Received on Wed May 16 2001 - 03:32:10 CDT

Original text of this message

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