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: Count(*) last 30 seconds

Re: Count(*) last 30 seconds

From: Jan Pruner <jan_at_pruner.cz>
Date: Tue, 11 Feb 2003 10:34:16 -0800
Message-ID: <F001.00549C06.20030211103416@fatcity.com>


Because Oracle documentation says that count(1) has better performance than count(*).
I do not know why is it so. WIll it make clear some guru on this list?

JP

On Tuesday 11 February 2003 18:59, you wrote:
> Why use count(1) instead of count(*)? They all does the same thing.
> So does count(primary key).
>
> Richard Ji
>
> -----Original Message-----
> Sent: Tuesday, February 11, 2003 12:09 PM
> To: Multiple recipients of list ORACLE-L
>
>
> Hi,
> 1. create unique index or primary key AND update statistics of the
> table
> 2. use count(1) instead of count(*)
>
> JP
>
> On Tuesday 11 February 2003 17:19, you wrote:
> > Hi list,
> >
> > I issue a select count(*) from mytable and last 30 seconds.
> >
> > The table has 1,466,196 records and were loaded with a batch process, so
> > they are in a countinous space.
> >
> > I consider that time exagerated.
> >
> > The TBS is LMT with a Uniform size of 128 MB.
> >
> > The block size is 8MB, version 9.2.0.1.0 in Windows 2000.
> >
> > Where should I start looking ???
> >
> > TIA
> >
> > Ramon E. Estevez
> > com.banilejas_at_codetel.net.do
> > 809-565-3121

-- 
         Pruner Jan
       jan_at_pruner.cz
     http://jan.pruner.cz/
-----------------------------
Only Robinson Crusoe had all his work done by Friday
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jan Pruner
  INET: jan_at_pruner.cz

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Feb 11 2003 - 12:34:16 CST

Original text of this message

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