insert 20000 records time problem
I have a recordset loaded in memory with 20000 records.I am using VB6 and
Time is the problem.With the INSERT statement i need at least 3' minutes to
write them to the database but i want this to happen in less than a minute!
Is it possible?
Re: insert 20000 records time problem
"v.des" <email@example.com> wrote:
>I have a recordset loaded in memory with 20000 records.I am using VB6 and
>Time is the problem.With the INSERT statement i need at least 3' minutes
>write them to the database but i want this to happen in less than a minute!
>Is it possible?
Sorry, I'm just learning the tricks of SQL Server myself, but do the records
have to be in memory? In other words can you use DTS or bcp instead of VB?
Also check the indexes on the table you're adding to. Indexes speed up queries,
but slow down inserts because not only are you writing the record, but you're
creating a record for each index. Also SQL server is creating transaction
log records for each new insert. You may consider dropping any indexes and
turning off transaction logging for the operation. (I believe bcp does both)
May SQL Server pro's flog me if my inexperience shows.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center