Return-Path: <root@fatcity.cts.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id h1BMSsS29995
 for <oracle-l@orafaq.net>; Tue, 11 Feb 2003 16:28:54 -0600
X-ClientAddr: 209.68.248.164
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id h1BMSsQ29988
 for <oracle-l@orafaq.net>; Tue, 11 Feb 2003 16:28:54 -0600
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id LAA59353;
 Tue, 11 Feb 2003 11:12:27 -0800 (PST)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 00549C91; Tue, 11 Feb 2003 10:39:56 -0800
Message-ID: <F001.00549C91.20030211103956@fatcity.com>
Date: Tue, 11 Feb 2003 10:39:56 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Toepke, Kevin M" <ktoepke@trilegiant.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Toepke, Kevin M" <ktoepke@trilegiant.com>
Subject: RE: Count(*) last 30 seconds
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

With Oracle 6 and sometimes in Oracle 7 one count was faster than the other.


With Oracle 8.0+ you'll see that count(1) == count(*) == count(unique
column) == count(not null column) 

Don't believe me? Try it. 

-----Original Message-----
Sent: Tuesday, February 11, 2003 12:55 PM
To: Multiple recipients of list ORACLE-L


Interestingly enough, I haven't seen an official statement on count(*) being
slower than count(<column name>). 

Sunil Nookala
DBA
Dell Corp.



-----Original Message-----
Sent: Tuesday, February 11, 2003 11:09 AM
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@codetel.net.do
> 809-565-3121

-- 
         Pruner Jan
       jan@pruner.cz
     http://jan.pruner.cz/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jan Pruner
  INET: jan@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@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).


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: Sunil_Nookala@Dell.com

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@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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Toepke, Kevin M
  INET: ktoepke@trilegiant.com

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@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).

