Hi all,
First post here, please let me know if I've missed any protocols.
I have a strange problem, where an ASP page that calls a few stored
procedures takes very long to run, and in fact times out. Each of the
procs that are called takes several minutes to run through IIS, but if
I run them with the same parameters in Query Analyzer, they only take a
few seconds. What's more, this same page works fine when pointed at
other databases with the same tables, indexes, and similar (or more)
amounts of data.
I'm using Windows 2003 Standard, with ASP 3. Connection is directly
through ADO in ASP. Database is MSSQL2000 on Windows 2003. Everything
else on the server, and everything else in the database in question,
runs fine when accessed with ASP.
I know I haven't included a lot of details about the queries / tables /
indexes themselves, because I feel I've eliminated the possible issues
there. But I'm stumped--what could cause a single page to run slowly
with one database, and not any others, when the queries themselves run
fine with other interfaces?
I have not rebooted my servers, and it will be several days before I
can reasonably do that, so I'm hopeful you can help me find a "real"
solution!
Thanks,
Jeff 2 1472 je********@gmail.com wrote: Hi all,
First post here, please let me know if I've missed any protocols.
I have a strange problem, where an ASP page that calls a few stored procedures takes very long to run, and in fact times out. Each of the procs that are called takes several minutes to run through IIS, but if I run them with the same parameters in Query Analyzer, they only take a few seconds. What's more, this same page works fine when pointed at other databases with the same tables, indexes, and similar (or more) amounts of data.
Check out what is going on with SQL Profile. Add the Execution Plan events
to the trace so you can see what is different between asp and query
analyzer.
I suspect you are running into a behavior called "parameter sniffing". See:
This blurb from Bart Duncan may be of interest to you: http://tinyurl.com/h7aa
Also, take a look at this excellent whitepaper. http://www.microsoft.com/technet/pro...comp.mspx#EEAA
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Brilliant! Thanks, Bob, that was exactly the issue, and I never would
have stumbled on that myself. The fix I implemented was to replace add
some local variables in the proc, set them equal to the input
parameters, and then reference the variables in the body of the proc
instead of the params. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Warren Wright |
last post by:
Hi group,
I have a select statement that if run against a 1 million record
database directly in query analyzer takes less than 1 second.
However, if I execute the select statement in a stored...
|
by: Alex |
last post by:
Hello,
We have a database in MS SQL 2000 and I'm trying to link to it from MS
Access XP. I've created a user with full access to one specific table
in the MS SQL database, but Access won't...
|
by: wireless |
last post by:
I've had my SQL server database running for two years now without a
problem.
However, just today one of the main tables started returning an error.
The table is contained within a database...
|
by: MichaelC |
last post by:
Hi all,
I'm a newbie to SQL and I need help with investigating what ways are
possible to build an interface of some sort that wraps around a SQL
query script.
I have a simple SQL query which...
|
by: Jonathan LaRosa |
last post by:
Hi all -
I'm wondering if anyone has (or knows of) a tool that will allow me to
search through VB code, tables, queries, reports, forms, and other
objects, for references to all other types of...
|
by: Do |
last post by:
Hi,
Is it better to
objConn = Nothing
or
objConn.Close.
I'm starting to get an error message that
|
by: George Homorozeanu |
last post by:
I have an ASP.Net application that works with MS SQL Server in background to
show some infomartions to the users. I also have build the functionality for
downloading this information in a...
|
by: =?Utf-8?B?Q29ubnVsbA==?= |
last post by:
What could the possible reason be for obtaining "timeouts" when executing a
stored procedure from my application? If I execute the specific stored
procedure in Query Analyzer I do not get any...
|
by: Akhenaten |
last post by:
I am currently using enterprise manager to run multiple queries on a
single table in a DB. I refresh these queries every few minutes. Due
to the huge number of them I was looking for a better way...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |