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

where to put PARALLEL DEGREE in comples SELECT statement

From: J.W. <jw_ng_0b_at_att.net>
Date: Mon, 11 Feb 2002 23:11:35 GMT
Message-ID: <knjg6u4sil566sk62laohok29j7ql9ra0q@4ax.com>


I'm not sure where to put the keywords PARALLEL DEGREE

Do I put "parallel degree" twice for each subquery like this:

 select yyyymm, subcount, totcount, subcount/totcount*100 pct  from
(select substr(BUDAT, 1,6) yyyymm, count(*) subcount from BSID
    group by substr(BUDAT, 1,6) parallel ( degree 8 ) ),
(select count(*) totcount from BSID parallel ( degree 8 ));

or do let Oracle figure it out and just put it once at the end of the statement like this:

 select yyyymm, subcount, totcount, subcount/totcount*100 pct  from
(select substr(BUDAT, 1,6) yyyymm, count(*) subcount from BSID
    group by substr(BUDAT, 1,6)),
(select count(*) totcount from BSID)

 parallel ( degree 8 );

Thanks for any info. Received on Mon Feb 11 2002 - 17:11:35 CST

Original text of this message

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