Huge SQL query and ASP.NET...Question of efficiency

  • Thread starter Thread starter The Eeediot
  • Start date Start date
T

The Eeediot

Hello, again, ASPdotNET gurus!

I have a performance question for the group:

This may be a typical type of scenario but I'm still a newbie. I am trying to display the purchase history of customer accounts from a warehousing database. I am displaying the result(s) using a DataGrid in ASP.NET 1.1 pulling the data from an MS-SQL 2000 server. These results are being displayed through the company's Intranet.

I have the basic query setup that pulls the basic purhcase history from the SQL server. Now, I need to add some bells-and-whistles that only show sales from the current year, under a specific product code(s), etc. Would it be better to perform these queries / searches on the DataSet stored on the Web server or get the SQL server to perform these operations?

TIA...
 
I could be wrong but I would think it would make far more sense to only return the records that you need from SQL?

Why return a bunch of records you're only going to filter out anyway?
Hello, again, ASPdotNET gurus!

I have a performance question for the group:

This may be a typical type of scenario but I'm still a newbie. I am trying to display the purchase history of customer accounts from a warehousing database. I am displaying the result(s) using a DataGrid in ASP.NET 1.1 pulling the data from an MS-SQL 2000 server. These results are being displayed through the company's Intranet.

I have the basic query setup that pulls the basic purhcase history from the SQL server. Now, I need to add some bells-and-whistles that only show sales from the current year, under a specific product code(s), etc. Would it be better to perform these queries / searches on the DataSet stored on the Web server or get the SQL server to perform these operations?

TIA...
 
As a general rule, you want to pull as few records across the wire as possible, so have SQL Server do the work.

HTH.
Craig
Hello, again, ASPdotNET gurus!

I have a performance question for the group:

This may be a typical type of scenario but I'm still a newbie. I am trying to display the purchase history of customer accounts from a warehousing database. I am displaying the result(s) using a DataGrid in ASP.NET 1.1 pulling the data from an MS-SQL 2000 server. These results are being displayed through the company's Intranet.

I have the basic query setup that pulls the basic purhcase history from the SQL server. Now, I need to add some bells-and-whistles that only show sales from the current year, under a specific product code(s), etc. Would it be better to perform these queries / searches on the DataSet stored on the Web server or get the SQL server to perform these operations?

TIA...
 
Jason,

If the data does not change frequently or the Web server and SQL Server
are not in close proximity, then caching the data would make sense.

The underlying question is this: do the database objects support frequent
querying of the data (good indexes, narrow tables, stored procedure usage,
etc.)?

Andrew Corley
 
Back
Top