Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: EXEC SQL CONTEXT USE :context_name translates to nothing-ok, I think I got it right but...

Re: EXEC SQL CONTEXT USE :context_name translates to nothing-ok, I think I got it right but...

From: Tomasz Romanowski <tromanow_at_hotmail.com>
Date: 5 Jul 2002 22:50:54 -0700
Message-ID: <84e67408.0207052150.3f603ef3@posting.google.com>


OK, I guess I now understand how EXEC SQL CONTEXT USE actually works. It does not generate any new code, rather it affects all subsequent EXEC SQL statements without the regard to C++ code. EXEC SQL ENABLE THREADS causes all SQL statements that follow to be passed an additional context parameter, the one which gets selected with the EXEC SQL CONTEXT USE clause. The runtime contexts are selected correctly, I'm afraid I have to blame the poor performance on the overhead resulting from the aditional component in the WHERE clause which distributes the data stream amonsgst multiple threads.

tromanow_at_hotmail.com (Tomasz Romanowski) wrote in message news:<84e67408.0207051414.6786f56a_at_posting.google.com>...
> I'm having multiple threads selecting&converting records from an Oracle
> 9i database on a Solaris 8 box. The performance with 2 and 3 threads
> is roughly the same as with a single thread. The threads seem to
> compete for the same Oracle database connection.
> I'm using PROC 9.0.1 with the THREADS=YES option. I'm executing EXEC
> SQL ENABLE THREADS at the ver beginning and I'm allocating different
> runtime contexts and creating a separate database connection for each
> thread. I've noticed however that the statement
> EXECUTE CONTEXT USE :context_name;
>
> is translatad to NOTHING. Really, I cannot see any place in the
> generated .cpp code where a runtime context could be selected. This
> makes me think I'm using the default runtime context with all the
> threads competing for the same database connection. Right or wrong?
> Anyone know how to make PROC generate code to effectively select a
> runtime context?
Received on Sat Jul 06 2002 - 00:50:54 CDT

Original text of this message

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