Re: More efficient way to insert a dataset in .NET 2.0?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks for your insight, Sahil, I'll definitely check your book out. Doing
individual inserts is killing the execution time of my batch at present.

"Sahil Malik [MVP]" wrote:

> Cor,
>
> The problem with executing every command one by one is the network latencies
> you have to fight for each row that is changed. So if the data adapter is
> working with a dataset that has 3 changed rows, the data adapter will make 3
> trips to the database.
>
> By using SqlXml, you can batch those 3 rows in one UpdateGram, and by using
> BatchSize, you can use batched commands to send in the updates as one single
> network roundtrip.
>
> Even though commands might still be executed sequentially, the multiple
> network roundtrips amount to a significant saving of time.
>
> - Sahil Malik [MVP]
> http://codebetter.com/blogs/sahil.malik/
>
>
>
> "Cor Ligthert" <notmyfirstname@xxxxxxxxx> wrote in message
> news:OIiOjcBSFHA.1500@xxxxxxxxxxxxxxxxxxxxxxx
> > Sahil,
> >
> >> I think he is looking for a method that doesn't execute a SQL for every
> >> changed row in the datatable.
> >> DataAdapter.Update masks it for you, but internally it is still row by
> >> row - thus inefficient.
> >
> > Can you think of a solution (while not thinking on a program language) for
> > what you propose.
> >
> > Every instruction by a processor is done one by one. In a database can
> > forever the previous command have influence on the next. (think by
> > instance on autoincrement).
> >
> > So this would need a solution with add less optimistic multiprocessing. I
> > think that, before (AFAIK is opt. multiproc. still not complet out of the
> > labaratories) this kind of now in common rather fast to process problems
> > will use those technics, we should at least wait 10 years.
> >
> > (I count a multithreading processor for at least 2 processors)
> >
> > However just my thought,
> >
> > Cor
> >
>
>
>
.



Relevant Pages

  • Re: Whatever happened to at, batch, etc?
    ... > throwing a command at the system for one-shot execution while ... at, batch, and their support components. ... rz DOT uni-karlsruhe DOT de ...
    (comp.os.linux.misc)
  • Re: Help w/ At Utility
    ... later execution ... at and batch read commands from standard input or a speci­ ... If you were today to schedule an 'ls' command to run at 10:00am on July 31 could you GUARANTEE that your terminal would still be logged in 155 days later? ... When you run that from a console, you'll probably see it shutting down various services, before the reboot and then various services being restarted. ...
    (alt.linux)
  • Re: SSH login automation, get stuck at the last step.
    ... But the execution of the script stops ... filename.txt" command. ... but I don't want to use it as I want the script ... The "run batch filename.txt" should automatically be sent to the ...
    (comp.lang.tcl)
  • Re: ksh silently ignores function if mistakenly not autoloaded
    ... Here's the order of execution. ... This really takes place prior to command ... Shell scripts, with all their power, have one major drawback - they ... In the Korn Shell, there are two separate syntaxes for defining ...
    (comp.unix.shell)
  • Re: MATLAB Code for a stop process button which ex
    ... especially in the while loop(for each script command starting in the ... % varargin command line arguments to stop_button ... % line_num is the order of execution. ... msgno = msgno+1; ...
    (comp.soft-sys.matlab)