Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Performance
On Mar 12, 9:30 am, "pbrajesh" <rajesh.tamil.in..._at_gmail.com> wrote:
> Hi,
>
> We have an datawarehouse database Oracle 9i.
> A table has 145 fields and 70 million records for a month.
> We want to perform an group by 5 of fields in the table .
> How to do that will minimum time ?. I wrote an oracle procedure but it
> is very slow.
>
> Thanks
> R
Why would you use a procedure? This sounds like just a single SQL statement.
Take a look at the explain plan for the current version of the query. Consider the effect an index on the 5 group by columns would have. If it seems like it would be beneficial add the index. Look at the plan. Compare and consider then test.
Other considerations: larger sort_area_size and/or hash_area_size for query (set at session level)
HTH -- Mark D Powell -- Received on Mon Mar 12 2007 - 09:39:21 CDT