Dynamic SQL Vs Static SQL using Pro*C..

From: <kolli_s_at_hotmail.com>
Date: 1998/05/21
Message-ID: <6k1b3u$37q$1_at_nnrp1.dejanews.com>#1/1


[Quoted] Is there any performance impact between using Dynamic SQL and Static SQL in ORACLE. We are using Proc*C with flags "CONFIG=D:\orant\pro22\pmscfg.cfg".

When I say Dynamic SQL I meant something like: sprintf(sql_stmt, "select col1, col2 from tab1 where col1 = %s", col1_val); EXEC SQL execute :sql_stmt; /* or something similar..*/

Static SQL meant:
[Quoted] EXEC SQL select col1, col2 into :col1_val, :col2_val where col1 = :col1_val;

My collegues say using Dynamic SQL decreases the performance. I am sure about it. My argument is whether we use Dynamic or Static eventually an unparsed string is sent to the Server (ORACLE) and it needs to do exactly the same thing in either case.

I would appreciate your comments on this. Also, please Cc: your responses to "kolli_s_at_hotmail.com".

Thanks..

-Sudhir Kolli
kolli_s_at_hotmail.com

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Thu May 21 1998 - 00:00:00 CEST

Original text of this message