Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Any way to get RowCount by not using Select count(*) from table
> 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
![]() |
![]() |