Ask a Question related to ASP Database, Design and Development.
-
Dmitry #1
A Very slow response when I use 2 or more recordsets in ASP
I use ASP + SQL server 2000, one day I noticed that my scripts work
rather slow... I found that it happens when I use 2 or more queries,
for example, the following script
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "server3", "", ""
Response.Write Now & "<br>"
sql="SELECT 2 as sample"
Set RS=Conn.Execute(sql)
Response.Write Now & "<br>"
Set RS=Conn.Execute(sql)
Response.Write Now & "<br>"
RS.close
Conn.close
set RS = nothing
set Conn = nothing
%>
produces the following:
21.05.2004 18:03:03
21.05.2004 18:03:03
21.05.2004 18:03:12
9 seconds for a simple select?..
I noticed that if I use
Conn.CursorLocation = adUseClient
everything works as before, but I wonder, what could happen to server?
no hardware or software or quantity of simultaneous users has been
changed lately. The same script on other IIS works quickly without
client cursors...
Dmitry Guest
-
Slow to no response
I have an older box running Win2k with CF 5.0 SP 4 Enterprise and JRun 3.1. Its my last box still running 5 that I was leaving alone for all my... -
Slow Response
When I block a word or sentence and ask it to make a change , i.e. bold, change font, color, etc. the response time for that change to be made is... -
Slow Response after external connection
have been experiencing slow response time from my application after someone connects outside the firewall. This then affects everyone inside the... -
Slow login response response on TS 03 in AD mixed mode
We upgraded our NT 4 domain to an AD mixed until we get rid of the NT 4 BDC;s after completing this upgrade users began complaining about how long... -
FMP5.5 Application Response... slow!!!
Anyone who's seen my last few threads will know that I'm having crippling speed problems since upgrading to FMP5.5 from 4.1 I know it's nothing... -
Aaron Bertrand - MVP #2
Re: A Very slow response when I use 2 or more recordsets in ASP
Turn on profiler and perfmon and watch what else is going on between select
1 and select 2. Obviously there is no I/O or contention on the database
itself, because you're not actually touching any tables or procedures. But
something is going on that you're not going to be able to explain by code
alone, I don't think...
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
"Dmitry" <bohr936@hotmail.com> wrote in message
news:29cb33c.0405210618.66d9405f@posting.google.co m...> I use ASP + SQL server 2000, one day I noticed that my scripts work
> rather slow... I found that it happens when I use 2 or more queries,
> for example, the following script
>
> <%
> Set Conn = Server.CreateObject("ADODB.Connection")
> Conn.Open "server3", "", ""
> Response.Write Now & "<br>"
> sql="SELECT 2 as sample"
> Set RS=Conn.Execute(sql)
> Response.Write Now & "<br>"
> Set RS=Conn.Execute(sql)
> Response.Write Now & "<br>"
> RS.close
> Conn.close
> set RS = nothing
> set Conn = nothing
> %>
>
> produces the following:
>
> 21.05.2004 18:03:03
> 21.05.2004 18:03:03
> 21.05.2004 18:03:12
>
> 9 seconds for a simple select?..
>
> I noticed that if I use
>
> Conn.CursorLocation = adUseClient
>
> everything works as before, but I wonder, what could happen to server?
> no hardware or software or quantity of simultaneous users has been
> changed lately. The same script on other IIS works quickly without
> client cursors...
Aaron Bertrand - MVP Guest
-
Sonic #3
Re: A Very slow response when I use 2 or more recordsets in ASP
You probabally need to set up dome form of Index on the Table.
You can see whats going on with your queries by entering them into SQL
Query Analyzer and opening up the Execution plan window, Query->Show
Execution Plan.
Now run your query in the analyzer and look at the excution plan.
Hover your mouse right click on the table and go to manage indexes.
To know more about indexes try:
[url]http://www.sql-server-performance.com/query_execution_plan_analysis.asp[/url]
Sonic Guest
-
Dmitry #4
Re: A Very slow response when I use 2 or more recordsets in ASP
I think the queries are not the matter, because when I run them in
Query Analyzer, they work quite quickly, I've set up the necessary
indices.
The problem appears when I use ASP recordsets, or, for example, open
the tables in Access using ODBC. the delay doesn't depend on the
queries, even the simple "SELECT 1" causes the delay.
I tried to reinstall MDAC 2.8 but it didn't improve the situation.
[email]liam@liamhughes.com[/email] (Sonic) wrote in message news:<e00ae24f.0405260240.65566c2e@posting.google. com>...> You probabally need to set up dome form of Index on the Table.
>
> You can see whats going on with your queries by entering them into SQL
> Query Analyzer and opening up the Execution plan window, Query->Show
> Execution Plan.
>
> Now run your query in the analyzer and look at the excution plan.
> Hover your mouse right click on the table and go to manage indexes.
>
> To know more about indexes try:
> [url]http://www.sql-server-performance.com/query_execution_plan_analysis.asp[/url]Dmitry Guest
-
Mendel Nemanov #5
Re: A Very slow response when I use 2 or more recordsets in ASP
Could it be related to:
[url]http://support.microsoft.com/default.aspx?scid=kb;en-[/url]
us;235282
INFO: SQL Server Spawns Additional Connections When You
Open Multiple ForwardOnly ADO Recordsets
that would explain why Conn.CursorLocation = adUseClient
makes it faster.
9 seconds is still a long time for opening a connection,
so the problem may be something else.
(put a resopnse.write now() at the begining so you can see
how long it takes to open the first connection)
Good luck
Mendel Nemanov
Spotlight Design
run them in>-----Original Message-----
>I think the queries are not the matter, because when Inecessary>Query Analyzer, they work quite quickly, I've set up theexample, open>indices.
>The problem appears when I use ASP recordsets, or, foron the>the tables in Access using ODBC. the delay doesn't dependsituation.>queries, even the simple "SELECT 1" causes the delay.
>I tried to reinstall MDAC 2.8 but it didn't improve thenews:<e00ae24f.0405260240.65566c2e@posting.google. com>...>
>liam@liamhughes.com (Sonic) wrote in messageTable.>> You probabally need to set up dome form of Index on theentering them into SQL>>
>> You can see whats going on with your queries bywindow, Query->Show>> Query Analyzer and opening up the Execution planexcution plan.>> Execution Plan.
>>
>> Now run your query in the analyzer and look at themanage indexes.>> Hover your mouse right click on the table and go toperformance.com/query_execution_plan_analysis.asp>>
>> To know more about indexes try:
>> [url]http://www.sql-server-[/url]>.
>Mendel Nemanov Guest



Reply With Quote

