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: Query on a very, very large table

Re: Query on a very, very large table

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 11 Apr 2006 09:13:18 -0700
Message-ID: <1144771998.286011.244000@j33g2000cwa.googlegroups.com>


If the table has a declared PK constraint then the rdbms can scan the index rather than the table and return the count fairly quickly. In the absence of a declared PK, unique and non-unique indexes on not null columns can also often be used by the rdbms.

Is there a good way of counting the number of rows in a table ? http://www.jlcomp.demon.co.uk/faq/count_rows.html

This might allow the time necessary for a select count fall within reason for your use.

HTH -- Mark D Powell -- Received on Tue Apr 11 2006 - 11:13:18 CDT

Original text of this message

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