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: How to tune a SQL with 4 sbu-queries?

Re: How to tune a SQL with 4 sbu-queries?

From: Dino Hsu <dino1.nospam_at_ms1.hinet.net>
Date: Thu, 27 Sep 2001 10:05:07 +0800
Message-ID: <d625rtc2nj575gqqa8ujkjhj79ivb5c9q4@4ax.com>


On Wed, 26 Sep 2001 20:56:10 +0100, "Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote:

>snip
>
>select
> branch_code,
> branch_id,
> units,
> sum(units) over ( .. clause for branch_id ..) branch_units,
> sum(units) over ( .. clause for brand_code ..) brand_units,
> sum(units) over () total_units
>from
> (SELECT brand_code, branch_id, SUM(units) units
> FROM orders
> WHERE SF_YEAR_CAMP(year,camp) BETWEEN &1 AND &2
> GROUP BY branch_id, brand_code) b
>
>You could then consider whether to force your function-based
>index into action, or whether to create a materialized view on
> year, camp, brand_code, branch_id, sum(units)
>or
> sf_year_camp(year, camp), brand_code, branch_id, sum(units)

In the SQL reference, there is a note about the query partition clause:

<quote begin>
Note: If the objects being queried have the parallel attribute, and if you specify an analytic function with the query_partition_clause, then the function computations are parallelized as well. <quote end>

Do you think it is useful to set parallel attribute for the big table orders?

Dino Received on Wed Sep 26 2001 - 21:05:07 CDT

Original text of this message

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