Re: How to count round trips from ADO to Oracle?




"Phil Davidson" <Phil@xxxxxxxxxxxxxxxx> wrote in message
news:7aict2tlbc3dfd4ank48g7q5632jivmbu8@xxxxxxxxxx
I'm querying an Oracle database via ADO. How can I count the round trips
made to the database? (I thought I would find the answer using PerfMon
or perhaps Visual Studio Analyzer, but I haven't found the answer yet.
Maybe the answer is in Visual Studio Analyzer but I have difficulty
getting it to capture events.)

is there not a tool similar to SQL Server Profiler that comes with Oracle?
With Profiler you can monitor every single SQL statement that ADO utters.
You want the equivalent.

But in general

Establishing a Connection Object will be a round trip
A Connection or Command Execute will be a round trip
A Command.Refresh will be a round trip (to setup parameters)
A RecordSet.Open will be a round trip
A server-sided RecordSet with many MoveNext's will be as many round trips as
there are records divided by the the Cache buffer. So if the buffer size is
100 records and you have done a SELECT that is 550 records, expect 6 round
trips.
A client-sided RecordSet... - difficult to know. Depends on how Microsoft
have implemented filling in the client-side with all records.

Note you can improve performace by
- telling ADO when Connection or Command Execute DOES NOT return a recordset
- telling ADO what RecordSet or Comamnd object contains
- using "SET NOCOUNT ON" in Stored Procedures if yo uare not interested in
knowing how many records are affected when you do UPDATE,INSERT or DELETE

Stephen Howe


.



Relevant Pages

  • RE: Calling SP from ADO and passing parameters
    ... SQL Server version? ... But don't use parameters.refresh as this makes a round trip to the server. ... Use createparameter instead. ... ADO 2.6 also introduced namedparameters, so I'd read up on those as well. ...
    (microsoft.public.data.ado)
  • RE: Calling SP from ADO and passing parameters
    ... SQL Server version? ... But don't use parameters.refresh as this makes a round trip to the server. ... Use createparameter instead. ... ADO 2.6 also introduced namedparameters, so I'd read up on those as well. ...
    (microsoft.public.vb.database.ado)