Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL statement -- about index and group by
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.deReceived on Mon Apr 20 1998 - 00:00:00 CDT
![]() |
![]() |