insert 20000 records time problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: insert 20000 records time problem

  1. #1
    v.des Guest

    insert 20000 records time problem

    I have a recordset loaded in memory with 20000 records.I am using VB6 and
    SQL7.
    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?







  2. #2
    JasonL Guest

    Re: insert 20000 records time problem


    "v.des" <v.des@k-netgroup.com> wrote:
    >I have a recordset loaded in memory with 20000 records.I am using VB6 and
    >SQL7.
    >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?

    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.
    -Jason

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center