Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Performance Gains using Bind Variables (Parameterized Queries)in ADO
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