Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Difference between NUM_ROWS and COUNT(*)
Thomas Klinger schrieb:
> Hi there!
>
> A small question:
> what's the difference between NUM_ROWS ind USER_TABLES and COUNT(*) from the
> same table?
> i.e. in USER_TABLES I have for the table X the value 32410 in NUM_ROWS. With
> a select count(*) from X; I get the value 38986.
> Does the second value depends on the High-Watermark? Or is there some other
> reason?
>
> Thanks for the answer.
>
The value NUM_ROWS in USER_TABLES is the amount of rows for the table X at the
moment
when this table was analyzed with the ANALYZE-command. It will be out of date
the very next moment
when some rows inserted in or deleted from that table. COUNT(*) always returns
the current amount
of rows.
Regards, Stephan
--
Dipl.-Inf. (FH) Stephan Born | beusen Consulting GmbH fon: +49 30 549932-0 | Landsberger Allee 392 fax: +49 30 549932-29 | 12681 Berlin mailto:stephan.born_at_beusen.de | Germany --------------------------------------------------------------- PGP-Key verfügbar | PGP-Key available ---------------------------------------------------------------Received on Mon Dec 20 1999 - 04:41:51 CST
![]() |
![]() |