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: PL/SQL:Efficiency of inline SQL vs use of Dynamic SQL Package

Re: PL/SQL:Efficiency of inline SQL vs use of Dynamic SQL Package

From: EXE <exe_at_exesolutions.com>
Date: Mon, 14 Sep 1998 21:44:31 -0700
Message-ID: <35FDF0AF.9A322934@exesolutions.com>


> I am writing an application in PL/SQL which involves many SQL insert
> statements where I require a count of the number of records for each insert.
>
> My query is whether 1. It is more efficient to perform SQL inline and use
> select count(*) to return the number of rows;, or, 2. Use the dynamic SQL
> package which also returns the number of rows inserted.

Dynamic SQL is far less efficient than hard coded SQL or PL/SQL. And in some versions such as 7.1.4 and 7.1.6 (VM mainframe) leaks memory. The reason to use DSQL is if you have to or if coding around it would be extremely difficult or involve disk I/O.

Daniel A. Morgan Received on Mon Sep 14 1998 - 23:44:31 CDT

Original text of this message

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