Home » RDBMS Server » Server Administration » binding variables
binding variables [message #57317] Thu, 05 June 2003 04:47 Go to next message
Sheila
Messages: 28
Registered: May 1998
Junior Member
I have written an application in VC++ that has many DB query statements. for example, in one user request it has to run a simple SELECT query in a loop about 7000 times to produce a result.
I want to use the native ability of oracle call interface about variable binding. As you know, when oracle takes any DML or query, it looks for IDENTICAL parsed statements in cache. If it finds this statement, it will use it as pre-parsed; else it will reparse the statement. Since, parsing is very
binding variables [message #57318 is a reply to message #57317] Thu, 05 June 2003 04:50 Go to previous messageGo to next message
Sheila
Messages: 28
Registered: May 1998
Junior Member
I have written an application in VC++ that has many DB query statements. for example, in one user request it has to run a simple SELECT query in a loop about 7000 times to produce a result.
I want to use the native ability of oracle call interface about variable binding. As you know, when oracle takes any DML or query, it looks for IDENTICAL parsed statements in cache. If it finds this statement, it will use it as pre-parsed; else it will reparse the statement. Since, parsing is very expensive operation, I'd like to use this ability to make my application run faster.
I'll be really appreciated if you guide me? and if my problem isn't clear yet, please let me know that.
Re: binding variables [message #57322 is a reply to message #57318] Thu, 05 June 2003 17:21 Go to previous messageGo to next message
Guy Rassabi
Messages: 10
Registered: February 2003
Junior Member
Hi,

Try the following artical from MetaLink
doc id = 74123.1

Please let me know if it helped...

Guy
Re: binding variables [message #57354 is a reply to message #57322] Sun, 08 June 2003 01:10 Go to previous message
Sheila
Messages: 28
Registered: May 1998
Junior Member
I have many different types in my SQL statement; by the way, let me give an example:
const char* EXECUTED_PROJECT_QUERY = "SELECT Project.* FROM Project,TestStepExecResult WHERE TestStepExecResult.WSID = %s AND TeststepExecResult.BUILDID = %s";
CString strQuery;
while (some condition)
{
for(...){ //some new values are assigned to idWS and idB
strQuery.Format(EXECUTED_PROJECT_QUERY , idWS, idB);
} //end_for
}
====================
As you see this SQL statement has to be executed many times with some new values assigned to it each time; I'm looking for some ways to prevent the query statement to be reparsed each time.
Previous Topic: Help! Require intensive database testing procedure..
Next Topic: Failed to install oracle 8.1.7
Goto Forum:
  


Current Time: Mon Dec 30 17:31:46 CST 2024