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: select count(*) optimization

Re: select count(*) optimization

From: Authorised User <bp_at_bp.com>
Date: 1997/03/07
Message-ID: <01bc2ac0$18a53960$b92e64a1@azkrdw00173.krd.az.bp.com>#1/1

G'day Jim

Try

select count(primary_key_column_name) from blah;

Bob Johnson

jim nash <jimnash_at_sprintmail.com> wrote in article <331D9E0D.4B3E_at_sprintmail.com>...
> Anyone know how to fool the optimizer into using a
> primary key access path to count all rows in a table?
> e.g.
> select count(*) from blah;
>
> In my case the rows are very long, the prim key is very short,
> and the full table scan brings the machine to its knobby knees.
>
> - Jim
>
>
Received on Fri Mar 07 1997 - 00:00:00 CST

Original text of this message

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