Re: SqlCommand Open VERY slow on application load
From: Andre Ranieri (AndreRanieri_at_discussions.microsoft.com)
Date: 02/04/05
- Next message: Kevin Spencer: "Re: difference between asp and asp.net"
- Previous message: ScooterMX: "difference between asp and asp.net"
- In reply to: Kevin Spencer: "Re: SqlCommand Open VERY slow on application load"
- Next in thread: B B: "Re: SqlCommand Open VERY slow on application load"
- Reply: B B: "Re: SqlCommand Open VERY slow on application load"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 4 Feb 2005 11:35:02 -0800
I have to think that 45 seconds to create a SqlConnection is not a normal
thing, even for managed code like .NET.
If you run SQL Profiler, do you start seeing the log fill up as soon as you
F11 step into the conn.Open() line or does the Profile log sit empty for the
45 seconds and fill at the end? How about memory usage on your laptop? does
it hit the roof when it hits this line? I'm guessing it doesn't.
I'm running a very similar situation, 2.4GHz Pentium IV 2.4 notebook w/ 1 mb
memory, currently developing an ASP.NET app that includes web.config
connection strings to two separate SQL 2000 servers. I'm not seeing any
noticable delay when creating, instantiating and opening a SQLConnection
object.
One last point of curiosity: it looks like your first call to the database
is through a SqLCommand to a datareader of something like that. What if your
first call is to fill a dataset using a data adapter? I know a da
automatically handles connection state for the connection, maybe that would
be faster?
- Next message: Kevin Spencer: "Re: difference between asp and asp.net"
- Previous message: ScooterMX: "difference between asp and asp.net"
- In reply to: Kevin Spencer: "Re: SqlCommand Open VERY slow on application load"
- Next in thread: B B: "Re: SqlCommand Open VERY slow on application load"
- Reply: B B: "Re: SqlCommand Open VERY slow on application load"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|