Re: Pro*C 2.2 too slow !

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1997/02/10
Message-ID: <32fe9b26.2271235_at_nntp.mediasoft.net>#1/1


To avoid the sqlcheck=full or sqlcheck=semantics and use pl/sql, you can code:

{
EXEC SQL BEGIN DECLARE SECTION;

    VARCHAR        theStmt[500];
    short          theStmt_i;

EXEC SQL END DECLARE SECTION; #define READ_PIPE \
"begin plex.read_pipe( output=>:b1:i1 ); end;"

    EXEC SQL WHENEVER SQLERROR DO sqlerror();

    strcpy( theStmt.arr, READ_PIPE );
    theStmt.len = strlen( theStmt.arr );     EXEC SQL PREPARE READ_PIPE_STMT FROM :theStmt;     EXEC SQL DECLARE READ_PIPE_CURS CURSOR FOR READ_PIPE_STMT;     EXEC SQL OPEN READ_PIPE_CURS USING :theStmt:theStmt_i; }

instead of:

{
EXEC SQL BEGIN DECLARE SECTION;

    VARCHAR        theStmt[500];
    short          theStmt_i;

EXEC SQL END DECLARE SECTION;     EXEC SQL WHENEVER SQLERROR DO sqlerror();

    EXEC SQL EXECUTE
    BEGIN
       plex.read_pipe( output=>:theStmt:theStmt_i );     END;
    END-EXEC; }

by using dynamic sql, you can avoid the overhead of the pl/sql precompile with sqlcheck=full or sqlcheck=semantics.

>

On 7 Feb 1997 19:17:32 GMT, mmcnul_at_jpmorgan.com (Mark McNulty) wrote:

>In article 131_at_mail.prodv.de, bittner_at_prodv.de (Christian A. Bittner) writes:
>> Hello Folks!
>>
>> I'm developing Pro*C 2.2 based applications within an UNIX/ORACLE
>> 7.3-environment (SINIX Risc Machine).
>> Unfortunately the Pro*C - precompiler is terrible slow when setting
>> the "sqlcheck=full"-feature. In this case the precompiler connects to
>> the database - and that leads to poor performance (~5min for an
>> average complex precompiling). And time is money...
 [snip]
>> Christian A. Bittner
>
>Use stored procedures, which would allow you to change the SQL without
>re-compiling, or use some non-compiling tool, or run the PL/SQL on the
>database server.
>
>Good luck,
>Mark McNulty
>Quadris Consultant
>mmcnul_at_quadris.com
>
>Note-these views are my own and not those of JP Morgan or JYACC.
>
>
>
>

Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com                          

http://govt.us.oracle.com

  • Check out Oracle Governments web site! ----- Follow the link to "Tech Center" and then downloadable Utilities for some free software...

statements and opinions are mine and do not necessarily reflect the opinions of Oracle Corporation Received on Mon Feb 10 1997 - 00:00:00 CET

Original text of this message