How to speed up server.createobject("adodb.connection")

sornavoor
sornavoor used Ask the Experts™
on
Hi,

I have a web application that is largely driven by ASP Code. The backe end is oracle.

While I was profiling my application to speed it up, I noticed that server.createobject("adodb.connection") sometimes is very slow.  It typically takes anywhere between 10 and 2000 milliseconds.

Quite often, it takes 10-100 millisecond. But sometimes it can be very slow.

I was wondering if there are any windows settings that i could tweak to speed up the process.

This is a virtual directory on Wink2k IIS5.0. ASP Engine is 5.6 and ADO version is 2.7

Appreciateyour BIG HELP

Thanks
Sorna
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Project Manager
Commented:
Well, I can't help speed up your connection object, but I can tell you what not to do.

Do not put a connection object in the global.asa file.
Do not put connection objects in Application objects.
DO close all you connection objects when you are done with them, preferably as soon as the recordset is done with the rows.  If you do not close ALL your connection and record objects the server WILL fail as soon as the buffer gets full.
If possible, use GetRows() or GetString() to store recordsets in an array instead of a regular recordset.
Try declare your connection object using the Object element, such as:

<object id="objConn" Runat="Server" ProgID="ADODB.Connection"></object>

Commented:

1)Can use object id
<object id="objConn" Runat="Server" ProgID="ADODB.Connection"></object>

2)Can declare connection object in global.as and reuse it.

3)Can put in COM+/Mts

Commented:
No comment has been added lately and it seems that this question have been abandoned. So it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question or invite a Moderator to close this question if there's no reply from you after seven days.

In the absence of responses, I will recommend the following:

To accept the comment and points awarded to  mgfranz


** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **


Just trying to help for the cleanup...
gladxml

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial