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 -> Performance Gains using Bind Variables (Parameterized Queries)in ADO

Performance Gains using Bind Variables (Parameterized Queries)in ADO

From: Mark G <markag_at_wonderstats.com>
Date: Thu, 17 Aug 2000 14:55:10 -0400
Message-ID: <F4155D9F9AA4D111B9990020AFBA52D53F6133@class06.ip061.sfi-software.com>

Does anyone out there have any opinions/experience with ADO and Parameterized queries and comparing it's performance to straight brute force SQL? What I mean is I can do this in ADO:

Do Until RSCustomers.EOF

    SQL = "Select * from MyTable Where Cust_ID = " & RSCustomers("Cust_ID")

    adoConn.Open SQL, .....
    ...processing stuff....
    RSCustomers.MoveNext
Loop

When I look into the sql_text in v$sql, I'd see something like this:

Select * from MyTable Where Cust_ID =  1234
Select * from MyTable Where Cust_ID =  1235
Select * from MyTable Where Cust_ID =  1236
Select * from MyTable Where Cust_ID =  1237

Now if I do a parameterized query in ADO, the same SQL text looks like this:

Select * from MyTable Where Cust_ID = :V001

and only appears no more than twice (why??).

I KNOW that param'd queries are supposed to be quicker, but how much?

TIA Received on Thu Aug 17 2000 - 13:55:10 CDT

Original text of this message

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