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: where to put PARALLEL DEGREE in comples SELECT statement

Re: where to put PARALLEL DEGREE in comples SELECT statement

From: Adrian Billington <billiauk_at_yahoo.co.uk>
Date: 12 Feb 2002 00:53:39 -0800
Message-ID: <dee17a9f.0202120053.11839866@posting.google.com>


JW

PARALLEL DEGREE is DDL i.e. something you specify at create table time. To "parallelize" your query (assuming your OS has multiple processors, your init.ora parameters are set to allow it etc) you need to use hints:-

> select /*+ PARALLEL(a,8) PARALLEL(b,8) */ yyyymm, subcount, totcount, subcount/totcount*100 pct
> from
> (select /*+ PARALLEL(BSID,8) */ substr(BUDAT, 1,6) yyyymm, count(*) subcount from BSID
> group by substr(BUDAT, 1,6)) a,
> (select /*+ PARALLEL(BSID,8) */ count(*) totcount from BSID) b;
>

OR you can alter the table BSID to set a default degree for the table, which Oracle should use at execution time (ALTER TABLE bsid PARALLEL 8;)

HTH Adrian Received on Tue Feb 12 2002 - 02:53:39 CST

Original text of this message

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