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: PARALLEL_ENABLE...Usage and Measurement...

Re: PARALLEL_ENABLE...Usage and Measurement...

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Fri, 10 Jan 2003 14:11:12 -0800
Message-ID: <3E1F44FF.3AC0F658@exesolutions.com>


alincoln wrote:

> Hi, newbie to this news group...
>
> I have a simple function that I wish to PARALLEL_ENABLE under Oracle
> 8.1.7...
>
> CREATE OR REPLACE function cleanString (
> in_string in varchar2
> ,in_verbose in number default 0
> )
> return varchar2 parallel_enable is
>
> v_OutString VARCHAR2(50) := '';
> v_Char CHAR(1);
>
> begin
>
> if ( in_string is null ) then
> v_OutString := '';
> else
> print.Value( in_string, 'Starting' );
> begin
> for v_ind in 1..length( in_string ) loop
> v_Char := SUBSTR(in_string, v_ind, 1);
>
> if( ('A' <= v_Char AND v_Char <= 'Z') OR ('0' <=
> v_Char AND v_Char <= '9') ) then
> v_OutString := v_OutString || v_Char;
> elsif( 'a' <= v_Char AND v_Char <= 'z' ) then
> v_OutString := v_OutString || upper(v_Char);
> end if;
>
> end loop;
> exception
> when others then
> v_OutString := '';
> end;
> end if;
>
> print.Value( v_OutString, 'Returning' );
>
> return v_OutString;
>
> end;
> /
>
> I am then using this in an INSERT statement in the 'Hope' that it will
> run in Parallel.
>
> insert into duplicate_check_superkey (
> order_id
> ,line_item
> ,key
> ,timestamp
> ,forced_ind
> )
> values (
> theLine.idOrder
> ,theLine.lineItem
> ,rtrim(ltrim(upper(theLine.idProduct)))
> || rtrim(ltrim(theLine.shipZip))
> || theLine.shipState
> || cleanString(nvl(theLine.shipCity,' '))
> || cleanString(nvl(theLine.shipFirstName,' '))
> || cleanString(nvl(theLine.shipMiddleName,' '))
> || cleanString(nvl(theLine.shipLastName,' '))
> || cleanString(nvl(theLine.shipAddressOne,' '))
> ,SYSDATE
> ,0
> );
>
> The code runs fine except that it appears to simply run in a
> sequential manner. How does one verify/confirm that a function is
> truely running in parallel?
>
> Configuration :
> - Solaris 2.4
> - Sun 8500 Server
> - Oracle 8.1.7
>
> Thx in advance,
>
> Adym Lincoln
> Edgewater Technologies, Inc.

One does not set a function to run in parallel mode. One must have enough CPUs and enable parallel processing in the init.ora and in the definition of the tables and indexes.

Research it at http://tahiti.oracle.com.

Daniel Morgan Received on Fri Jan 10 2003 - 16:11:12 CST

Original text of this message

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