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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Which process structure is more effective ?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-11-11 : 12:09:57
DAVID writes "I and my co workers having a debate on which process is more efective:
The entire process is written using Stored Procedures in SQL 7.0

Process A;

1)Using Loop technique[the driver] read the Source table between 500 to 5,000 rows for any given batch and apprx. 35 fields.

2)Validate some key fields for each row by calling SP1. If validation fails delete the row from the table and insert it into error_log table with error description.
Upon completion of Validation process go to step 3

3)Run the Loop again against fully validated rows and pass them
to SP2 for final update/insert on Target tables.


Process B:

1)Using Loop technique[the driver] read the Source table between 500 to 5,000 rows for any given batch and apprx. 35 fields.

2)Validate some key fields for each row by calling SP1. If validation fails delete the row from the table and insert it into error_log table with error description and if the row passes validation then pass it to SP2 for update/insert on Target table.

In another words will:

Read + Validate + Update/Insert Target one row at the time be more effective than

Read + Validate entire table as one module then,
Read + Update/Insert Target table.


You may also e-mail me at Intermarkk@aol.com

Thanks you in advance for resolving this issue,

David"
   

- Advertisement -