Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 17th, 2003, 12:24 PM
Registered User
 
Join Date: Sep 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default process millions of rows

i need to apply business logic to a table containing millions of rows (15M-30M). I need to process every row. The database is sql server 2000, and front end will be written in asp.net. What are your suggestions for the best way of approaching this problem in order to create a well performing application.
Should business rules be written as stored procs?
Should I partition the table?
Thanks, for your help


 
Old September 17th, 2003, 07:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

What is it that you intend to do to all these rows? How often do you need to do this?

In your case I don't think partitioning will help unless you have multiple servers.

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
 
Old September 17th, 2003, 07:41 PM
Registered User
 
Join Date: Sep 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

each row will contain transaction information, each transaction will be checked by the business rules engine to determine if it's "good" or "bad" and that information will be stored in the same or separate table. This process will be performed on a daily basis (overnight).
Why won't partitioning be effective if a single sql server is used? Should business logic reside in the database (procs, scripts)?
Thanks

 
Old September 17th, 2003, 09:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

Partitioning simply divides the one large table into several smaller ones. If your updates were confined to a (relatively) small subset of the rows, and that subset resided in a single partition (or at worst a very small number of partitions), then operations on that smaller table would be more efficient than the same operation on the same subset of the rows in the larger table. The indexes are smaller, etc.

But, since you indicate that the operation is done on all the rows, the only thing you'll buy is the overhead of managing the multiple partitions. If you had multiple servers, then the multiple partitions could be spread out over those processors and could be processed in parallel.

Without knowing the extent of your 'business logic' its hard to say for certain, but I suspect you'll find far more efficiency using a stored procedure so the processing takes place on the server and within the database itself. The alternative would be to ship 30 million rows to a client, and you really don't want to do that.

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
 
Old September 18th, 2003, 12:08 PM
Registered User
 
Join Date: Sep 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
process.startinfo opens new instance of process Anypond General .NET 0 August 28th, 2008 05:35 AM
Defining a process snufse ASP.NET 2.0 Basics 5 April 23rd, 2008 07:13 AM
Sending millions of mail ash141vsp2003 ASP.NET 2.0 Professional 0 May 29th, 2007 12:21 AM
Terminate Process (How To) Nova Beginning VB 6 3 October 14th, 2006 02:37 PM
Limit rows returned and next rows minhpx General .NET 1 August 12th, 2004 06:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.