[dba-VB] vb.net - Updates

Eric Barro ebarro at verizon.net
Tue Apr 29 15:02:10 CDT 2008


John,

This article might be of use in your scenario...

http://www.codeproject.com/KB/database/PassingArraysIntoSPs.aspx?msg=937012

It talks about passing an array or datatable to a stored procedure for CRUD operations. The introductory sentence says it all...

"Have you ever wanted to pass a DataTable, or array, containing tens or tens of thousands (or even millions) of records, into a SQL Server2000 stored procedure in just one database call? "

--Eric

From: jwcolby <jwcolby at colbyconsulting.com>
Date: 2008/04/29 Tue PM 02:11:36 CDT
To: 
	"Discussion concerning Visual Basic and related programming issues." <dba-vb at databaseadvisors.com>
Subject: Re: [dba-VB] vb.net - Updates

Interesting.  Do you think that you would get deadlocks for different 
blocks of records?  In my case there is not "a million users" scenario. 
  This process (and its threads) are the only things modifying data. 
Each "chunk" is a defined block  of records.

John W. Colby
www.ColbyConsulting.com


Shamil Salakhetdinov wrote:
> <<<
> ...it is definitely going to be desirable to feed the update 
> process off to a thread...
> Hi John,
> 
> I was lucky with multi-threaded batch updates' samples I posted here the day
> before yesterday - and the new tests show that batch updates in
> multi-threading environments result in MS SQL deadlocks: I should have
> thought about those issues before...
> 
> Recap: forget batch updates - one of the scenarios of your task could be:
> 
> - many readers;
> - many parsers;
> - but just one updater making batch updates, or many updaters but updating
> just one row in one cycle...
> 
> HTH to save your time,
> Shamil
> 
> 
> 
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Tuesday, April 29, 2008 3:31 AM
> To: Discussion concerning Visual Basic and related programming issues.
> Subject: Re: [dba-VB] vb.net - Updates
> 
> We have ignition folks.  I just updated the first 10K records in the 
> database.  I had to set the batch size to 100, as I was getting a 
> timeout with a batch size as small as 1000 records.  I haven't done any 
> timings but it is definitely going to be desirable to feed the update 
> process off to a thread if I can figure out how to do that.
> 
> John W. Colby
> www.ColbyConsulting.com
> 
> 
> jwcolby wrote:
>> I THINK I have found my solution, called the SQLCommandBuilder.  I found 
>> reference to the command build saying how terrible it is, then a piece 
>> of code that, in simple plain language, shows how to use it all, using 
>> the simple objects I am already using.
>>
>> We shall see.
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
> 
> 
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com




More information about the dba-VB mailing list