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

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...
 
J

Jason MacKenzie

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...
 
C

Craig

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...
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top