Results 1 to 13 of 13

Thread: How To Insert 3,000,000 Records into a SQL Server Database

Hybrid View

  1. #1
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: How To Insert 3,000,000 Records into a SQL Server Database

    tg is correct in that it's a not-logged insert - which is why it's fast.

    It also does bypass "referential integrity" to some degree - but I would imagine that some of that can be controlled.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: How To Insert 3,000,000 Records into a SQL Server Database

    Quote Originally Posted by szlamany
    tg is correct in that it's a not-logged insert - which is why it's fast.

    It also does bypass "referential integrity" to some degree - but I would imagine that some of that can be controlled.
    Does that also mean that it will bypass triggers as well? We don't use triggers here (on penalty of death by paper cuts) so I'm not too clear on what would happen in that case.

    Tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: How To Insert 3,000,000 Records into a SQL Server Database

    Quote Originally Posted by techgnome
    Does that also mean that it will bypass triggers as well? We don't use triggers here (on penalty of death by paper cuts) so I'm not too clear on what would happen in that case.

    Tg
    Tg - I'm not sure - as we also dislike triggers... (yuk, bury business rules in hard to find places when you have STORED PROCEDURES where it really belongs)

    BTW - as far as reformatting data - we prefer to do it in VB, where we have complete control - then utilize the DATABASE ENGINE for as little as is required - BULK INSERT alone...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width