Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 ASP call takes too long

Author  Topic 

SamC
White Water Yakist

3467 Posts

Posted - 2003-11-19 : 10:56:00
Set p_objRS = Server.CreateObject("ADODB.Recordset")
Set p_objRS = p_objConn.Execute(p_strCommand)

Surrounding the two lines above with timer calls shows it is taking about 29 seconds to execute.

Executing the identical command in Query analyzer is less than 0.5 second.

This sounds like a connection pooling issue to me. Any thoughts about what might be going on?

Sam

SamC
White Water Yakist

3467 Posts

Posted - 2003-11-19 : 11:32:21
I dropped the procedure and created it again. Now ASP renders the page in 1 second.

Problem fixed.

I have no idea why. Got to have something to do with locating the procedure?

Sam
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2003-11-19 : 11:42:21
It might be that the cached execution plan sucked. When you re-created the proc, the execution plan was re-created.

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2003-11-19 : 11:45:33
Except it ran fine from Query Analyzer.

The proc name was

dbo.QR_Deptcompletions

There were 3 other "test" versions of the proc

dbo.QR_Deptcompletions2
dbo.QR_Deptcompletions3
dbo.QR_Deptcompletions4

I deleted these 'test' versions, and recreated the first. I wish I had done it a step at a time.

Sam
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-11-19 : 20:13:44
Running something from query analyzer will 99.99% of the time generate a new plan, so it will almost always be the most optimal plan.
Go to Top of Page
   

- Advertisement -