I have heard that the most time consuming task into a DB is the when we use
the Insert Statatement,
Is that true?
Ok I have an application that sends from 10 to 500 rows to the DB, those
rows are compared again a fixed value and then they are inserted to the DB i
f
the comparison is ok.
I would like to do all that inside the DB (a SP) but I don’t know how, so
I
created a WebService to do that, my point is that I’m not inserting row by
row instead I hold the rows in a Dataset (memory) and later I make one big
insert to the DB.
My question is should I leave that code like this or should go to the DB in
order to insert row by row to gain some performance?
Can you think a better way to do that, because that is the heart of my app
and I want to minimize the time it takes.
Thnks.
Kenny M.Hi Kenny,
Maybe this will give you a few solutions.
http://www.sommarskog.se/arrays-in-sql.html
"Kenny M." <KennyM@.discussions.microsoft.com> wrote in message
news:26D58C74-C301-466F-9B58-AC3C2A84AAFA@.microsoft.com...
>I have heard that the most time consuming task into a DB is the when we use
> the Insert Statatement,
> Is that true?
> Ok I have an application that sends from 10 to 500 rows to the DB, those
> rows are compared again a fixed value and then they are inserted to the DB
> if
> the comparison is ok.
> I would like to do all that inside the DB (a SP) but I don't know how, so
> I
> created a WebService to do that, my point is that I'm not inserting row by
> row instead I hold the rows in a Dataset (memory) and later I make one big
> insert to the DB.
> My question is should I leave that code like this or should go to the DB
> in
> order to insert row by row to gain some performance?
> Can you think a better way to do that, because that is the heart of my app
> and I want to minimize the time it takes.
> Thnks.
> --
> Kenny M.
No comments:
Post a Comment