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: There is NOT value in using BOUND variables!!! ???

Re: There is NOT value in using BOUND variables!!! ???

From: Erwin Dondorp <erwindon_at_wxs.nl>
Date: Thu, 11 Nov 1999 00:40:06 +0100
Message-ID: <382A0256.A731A6BC@wxs.nl>


> So what does it tell me? I remember that the perception about bound
> variables forced developers in our shop to change queries NOT to use
> bound variables (a few months ago) and todays test just confirms it.
>
> Yours thoughts?

Bound variables should never have a lower performance as far as I know.

2 arguments in favor of bound variables:

  1. In an environment where many SQL statements touch only a few (or one) record [as in a data entry application] there is the benefit that Oracle does not recompile all statements because in fact everyone is using the same statement. This might be as high a 50% CPU time saved. For queries that hit a lot of records the saving is negligable.
  2. Bound variables never suffer from errors with illegal characters. When the data contains a single quote, do all programmers expand this to 2 single quotes in all their code when an SQL statement is created?

--
Erwin Dondorp
<http://www.dondorp.com/> Received on Wed Nov 10 1999 - 17:40:06 CST

Original text of this message

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