Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: is it possible in pl/sql?

Re: is it possible in pl/sql?

From: Jared Still <jkstill_at_gmail.com>
Date: Tue, 15 Feb 2005 14:20:15 -0800
Message-ID: <bf46380502151420a385938@mail.gmail.com>


I believe that at one time it was faster to use count on a PK column, where the PK was made up of a single column.

At one point the optimizer was not quite smart enough to this itself. It's been quite some time ago, an old version of Oracle 7 I think.

In any case, it doesn't work that way now, and not worth spending too much time on.

Jared

On Mon, 14 Feb 2005 16:34:59 -0800, Joel Garry <joelgarry_at_anabolicinc.com> wrote:
> Anthony Wilson wrote:
>
> >it's a myth according to the venerable Tom Kyte. The SQL engine
> silently rewrites >count(1) to count(*):
>
> Funny, he mentions that is a fact, but I've missed the reference to
> where the fact is shown. Though I'm inclined to believe anything Tom
> says, I find this particular one ironic in that he is talking about
> facts and opinions when he says it. And I'm certainly glad he mentions
> the differing case of 7.x, as that means I didn't get the myth
> completely out of thin air or confused it with some other function.
> Just means that old habits die hard.
>
> Joel Garry
> http://www.garry.to
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Feb 15 2005 - 17:23:06 CST

Original text of this message

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