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.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL