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: Any way to get RowCount by not using Select count(*) from table

Re: Any way to get RowCount by not using Select count(*) from table

From: Dan Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 04 Jan 1999 14:08:17 -0800
Message-ID: <36913BD1.3204F513@exesolutions.com>


> If your table has a primary key (what table doesn't? :) )

I know this is a segue but as a DBA I would really appreciate it if developers would STOP putting primary keys on EVERY table.

For small static tables it takes twice as long for the SQL Engine to read the index and then read the table when a single read of the table would suffice. This same situation occurs in some cases with larger tables too. And this does not exactly enhance performance. If your concern is keeping the table in memory make it a cache table.

Daniel A. Morgan Received on Mon Jan 04 1999 - 16:08:17 CST

Original text of this message

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