Re: Bulk Insert
From: Jim (j.m.autry_at_earthlink.net)
Date: 05/04/04
- Next message: Tom Moreau: "Re: Getting the value that was generated using the IDENTITY property"
- Previous message: Aaron Bertrand - MVP: "Re: Getting the value that was generated using the IDENTITY property"
- In reply to: Dan Guzman: "Re: Bulk Insert"
- Next in thread: Dan Guzman: "Re: Bulk Insert"
- Reply: Dan Guzman: "Re: Bulk Insert"
- Messages sorted by: [ date ] [ thread ]
Date: 4 May 2004 08:14:44 -0700
It takes about 400ms to write 13Kb of data. I am also wrapping the
calls in a transaction. I was curious if the data could be formatted
in memory much like a file format and bulk inserted from that point
rather than actually having to write to a file in order to bulk
insert.
"Dan Guzman" <danguzman@nospam-earthlink.net> wrote in message news:<uG0rbtXMEHA.2488@TK2MSFTNGP10.phx.gbl>...
> How long is 'forever'? I wouldn't expect this to take more than a few
> seconds if the inserts are part of the same transaction and you are using
> ADO.NET rather than ADO.
>
> You could build a single string of insert statements (or proc executes) and
> execute these as a single batch. However, without knowing the details of
> what you are doing, I'm not sure this will help performance.
>
>
> --
> Hope this helps.
>
> Dan Guzman
> SQL Server MVP
>
> "James Autry" <j.m.autry@Austin.rr.com> wrote in message
> news:JMBlc.60764$Dn1.1382@fe2.texas.rr.com...
> > Ok, I have to enter up to 3,000 records (56 bytes each)into a table in one
> > shot. It takes forever doing the standard dataadapter/update. I changed
> to
> > a stored procedure to save each record, but the time saved was negligible.
> > Increased connection packet size, no improvement. The only thing left is
> to
> > a bulk transfer, but as I understand, this is not supported in ADO. How
> > would one do it using ExecuteNonQuery on multiple records for the same
> > table. Is there a better way?
> >
> > Thanks,
> > James
> >
> >
- Next message: Tom Moreau: "Re: Getting the value that was generated using the IDENTITY property"
- Previous message: Aaron Bertrand - MVP: "Re: Getting the value that was generated using the IDENTITY property"
- In reply to: Dan Guzman: "Re: Bulk Insert"
- Next in thread: Dan Guzman: "Re: Bulk Insert"
- Reply: Dan Guzman: "Re: Bulk Insert"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|