Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to get total number of rows before executing the sql /fetch
NNOOR wrote:
>
> Just a suggestion: Try "simplifying" the query (may be return only the
> key column, etc) and run this mock query in a stored proc. PL/SQL has
> an internal variable (attribute) defined called %ROWCOUNT. Use it.
>
> What I am trying to say is that if you are stuck with doing the query
> to find out the count, try minimizing the damage.
>
> Good Luck.
>
> Nasir (nnoor_at_cris.com)
If this query has to be run often, it might make sense to have a table of counts for each table in the schema. The total for each table could be updated by insert and delete triggers.
Ken Received on Fri Oct 03 1997 - 00:00:00 CDT
![]() |
![]() |