Re: How can I count rows fast ?
Date: Sat, 11 Jun 1994 14:56:31 GMT
Message-ID: <Cr8Mu7.EJv_at_nl.oracle.com>
Guido Derwand (derwand_at_sap-ag.de) wrote:
: Is there a faster method to count rows in a table than using SQL
: 'SELECT COUNT(*)' in Oracle V. 6 or 7 ? I've heard from some
: expirience with using 'SELECT COUNT(<index>)' to be faster, but
: I couldn't reproduce this (there seems to be no difference).
The quickest, but probably not the most accurate is using the statistics available in Oracle7. If you maintain the statistics of the table regularly, you can select the number of rows from the statistics table (the name of which I cannot remember at this moment). It may not be the completely accurate, but it might be close enough for some applications - decide for yourself.
Sandor Nieuwenhuijs
Oracle Netherlands
Received on Sat Jun 11 1994 - 16:56:31 CEST