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.
| Author |
Topic |
|
sbt1
Yak Posting Veteran
89 Posts |
Posted - 2006-12-06 : 09:22:09
|
| Can anyone shed light on this... I have two separate apps (one is a Windows executable, using OLE DB, the other is an ASP .NET using SQLDataSource) that both access the same database using the same queries.The ASP .NET version runs significantly faster than the Win32 version, when retrieving exactly the same data. I've verified that the queries used are identical.Thoughts? I need to speed up the Win32 version.Thanks. |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2006-12-06 : 09:29:15
|
| ODBC drivers accessing the same datasource are NOT guaranteeed to work at the same speed...part of it is called evolution...ie a better technique came with a later version, part of it is stupidity...ie a programmer who implemented a coding technique worse than another.You may be on a loser here....other than to try to ensure both applications use the same (faster) data access method. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-06 : 09:31:29
|
| Also, how do you handle the data being retreived?Peter LarssonHelsingborg, Sweden |
 |
|
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2006-12-06 : 09:39:27
|
| The ASP.NET version is probably setup to use connection pooling so it spends less time opening and closing database connections since it can reuse existing ones. I believe your Win32 version does not use connection pooling so it will have to open and close the database connection for each request. You might try to use stored procedures and try to cram as many statements as you can inside of them to limit the number of times your opening and closing database connections. |
 |
|
|
sbt1
Yak Posting Veteran
89 Posts |
Posted - 2006-12-06 : 09:46:33
|
| Good thoughts all. SQL server now supports a method of running multiple queries in a single call, correct? Not sure what it's called. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-06 : 10:01:11
|
| I think in SQL 2005 it is called MARS.Multiple Active Result Set.Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|