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: SQL statement -- about index and group by

Re: SQL statement -- about index and group by

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1998/04/20
Message-ID: <6hf9lp$mo$1@news00.btx.dtag.de>#1/1

Hi,

be aware that with COUNT(*) oracle always will do a full scan. Use the primary key instead COUNT(PK).

°½Ãi¿ß schrieb:
>
> When I issue an Select statement with group by ,
> is it useful to create a index on the columns in group by function ?
>
> example :
>
> There is a lot of data in Table Table_AA, I use
>
> SELECT COUNT(*), C_1, C_2, C_3, C_4, C_5
> FROM TABLE_AA
> GROUP BY C_1, C_2, C_3, C_4, C_5
>
> For the performance, do I need to create a index on (C_1, C_2, C_3, C_4,
> C_5 )
> Thank you !

--

Regards

Matthias Gresz    :-)

GreMa_at_t-online.de
Received on Mon Apr 20 1998 - 00:00:00 CDT

Original text of this message

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