Re: More efficient way to insert a dataset in .NET 2.0?
- From: "Stefan Wrobel" <StefanWrobel@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Apr 2005 10:15:02 -0700
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
> >
>
>
>
.
- Follow-Ups:
- Re: More efficient way to insert a dataset in .NET 2.0?
- From: Mythran
- Re: More efficient way to insert a dataset in .NET 2.0?
- References:
- More efficient way to insert a dataset in .NET 2.0?
- From: Stefan Wrobel
- Re: More efficient way to insert a dataset in .NET 2.0?
- From: Cor Ligthert
- Re: More efficient way to insert a dataset in .NET 2.0?
- From: Sahil Malik [MVP]
- Re: More efficient way to insert a dataset in .NET 2.0?
- From: Cor Ligthert
- Re: More efficient way to insert a dataset in .NET 2.0?
- From: Sahil Malik [MVP]
- More efficient way to insert a dataset in .NET 2.0?
- Prev by Date: Re: Cannon insert large values in Access memo field
- Next by Date: XMlDataDocument and MDAC
- Previous by thread: Re: More efficient way to insert a dataset in .NET 2.0?
- Next by thread: Re: More efficient way to insert a dataset in .NET 2.0?
- Index(es):
Relevant Pages
|