Wrox Home  
Search P2P Archive for: Go

  Return to Index  

activex_data_objects thread: Performance question


Message #1 by "Pete Davis" <pdavis@q...> on Mon, 25 Feb 2002 21:07:50 -0500
This is a multi-part message in MIME format.



------=_NextPart_000_02B3_01C1BE40.7BDA6820

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



We have a COM+ application. Most of our data queries are performed 

through a single component. Normally, we create an ADO connection object 

every time we perform a query (which happens in a call to a method in 

the COM+ component).



In an effort to boost performance, I thought that I would create a 

single connection object and re-use it in the component. As I was the 

only user and the application is single-threaded, I thought this should 

provide a performance boost.



The number of records being returned was about 35,000, and they were 

being returned several times.



Creating the connection object for each call was faster than using a 

global connection. That doesn't make sense to me. Any ideas?



Pete






Message #2 by agaisin@c... on Mon, 25 Feb 2002 22:35:11 +0000
hmmm...

interesting.

How are you testing the performance of each method, how many times did you run each test, with the same queries?

One possibility - 

It could be caching that's confusing you.

As an example, if the test was run only once each way, and the first test you ran was with with reusing the connection object, then
b/c none of the data was in the cache (at least for the first hit), it will take longer than the next run when you are creating a
new connection object each time...

For accurate performance testing, try the softwing.profiler component for beginning to end execution time in addition to sql
profiler to see how long each query is really taking...



Here's an article you may be interested in:

1) about reusing connection and other ado objects and how it affects performance:

http://www.eggheadcafe.com/articles/20010418.asp



hth,

Arthur Gaisin





---- Message from "Pete Davis" <pdavis@q...> at Mon, 25 Feb 2002 21:07:50 -0500 ------

We have a COM+ application. Most of our data queries are performed through a single component. Normally, we create an ADO connection
object every time we perform a query (which happens in a call to a method in the COM+ component). 



In an effort to boost performance, I thought that I would create a single connection object and re-use it in the component. As I was
the only user and the application is single-threaded, I thought this should provide a performance boost.



The number of records being returned was about 35,000, and they were being returned several times.



Creating the connection object for each call was faster than using a global connection. That doesn't make sense to me. Any ideas?



Pete







to unsubscribe send a blank email to leave-activex data objects-817590E@p...






  Return to Index