Re: is it possible in pl/sql?

  • From: Jared Still <jkstill@xxxxxxxxx>
  • To: joelgarry@xxxxxxxxxxxxxxx
  • Date: Tue, 15 Feb 2005 14:20:15 -0800

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@xxxxxxxxxxxxxxx> 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
> 
> 
> --
> //www.freelists.org/webpage/oracle-l
> 


-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
--
//www.freelists.org/webpage/oracle-l

Other related posts: