Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Finding total Rows without count() ?
The best way I've found to speed up this sort of count, is to use an
unique index associated with the table, using something like this :
select count(*) from my_table
where this_key > ' ' /* or any other value lower (alpha or numeric)
than the minimum */
Of course the result will be accurate only if none of the key values are null (generally, it must be true!).
Pierre
Ken Sproule a écrit :
> As always, thanks in advance for your help.
>
> I need a fast way to determine the total number of rows in a table. I
> assume somewhere Oracle stores such information about its tables.
> Where is it?
>
> The count() type syntaxes take much too long on tables of say 3+
> million rows, so I'm looking for a fast way to accomplish it.
>
> Post answers to the group, as others might be interested also.
>
> Thanks,
>
> Ken Sproule
> kenmn_at_tds.net
Received on Fri Dec 17 1999 - 06:42:04 CST
![]() |
![]() |