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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to get total number of rows before executing the sql /fetch

Re: How to get total number of rows before executing the sql /fetch

From: Ken Nichols <knichols_at_mcsilo.ilo.dec.com>
Date: 1997/10/03
Message-ID: <3434AE44.439@mcsilo.ilo.dec.com>#1/1

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

Original text of this message

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