Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Huge SQL query and ASP.NET...Question of efficiency (http://www.velocityreviews.com/forums/t90929-huge-sql-query-and-asp-net-question-of-efficiency.html)

The Eeediot 11-16-2004 08:35 PM

Huge SQL query and ASP.NET...Question of efficiency
 
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 MacKenzie 11-16-2004 09:06 PM

Re: Huge SQL query and ASP.NET...Question of efficiency
 
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?
"The Eeediot" <eeediot@hotmail.com> wrote in message news:puWdnZtnpK-E-AfcRVn-2A@giganews.com...
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...

Craig 11-16-2004 10:08 PM

Re: Huge SQL query and ASP.NET...Question of efficiency
 
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
"The Eeediot" <eeediot@hotmail.com> wrote in message news:puWdnZtnpK-E-AfcRVn-2A@giganews.com...
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...

=?Utf-8?B?QW5kcmV3IENvcmxleSwgTUNTRCwgTUNEQkE=?= 11-16-2004 10:12 PM

Re: Huge SQL query and ASP.NET...Question of efficiency
 
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

"Jason MacKenzie" wrote:

> 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?
> "The Eeediot" <eeediot@hotmail.com> wrote in message news:puWdnZtnpK-E-AfcRVn-2A@giganews.com...
> 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..



All times are GMT. The time now is 05:25 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.