Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6181771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:05:00+00:00 2026-05-24T01:05:00+00:00

We have a lengthy database operation. When we perform this operation with enlist =

  • 0

We have a lengthy database operation. When we perform this operation with enlist = true, it takes 29 minutes to complete. When we perform this operation with enlist = false, it takes only 15 minutes to complete. What is the reason for such a huge performance hit? Is it something related to the database server?

How do we avoid it? Please share your thoughts.

Database: SQL Server 2005

Frameowrk: .Net 3.0

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:05:01+00:00Added an answer on May 24, 2026 at 1:05 am

    How do we avoid it?

    and

    Total number of rows in a csv file is 100000.

    In this case, use SqlBulkCopy to write the 100,000 rows into a staging table (a basic and separate table, not part of your transactional tables; no triggers, foreign keys, etc). Once the data is in the staging table, use TSQL (either direct or a SPROC) to do the INSERT from the staging table into the transactional table, i.e. where your data lives. The transaction only needs to span this last operation.

    This achieves several key things:

    • SqlBulkCopy uses the same API as bulk-insert; it is the fastest way to shift large amounts of data over the wire to SQL Server
    • it minimises the size of the transaction, most notably by not including all the data transfer time in the transaction; only the core INSERT is transactional, but at this point all the data is local
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a lengthy number-crunching process which takes advantage of quite abit of OpenGL
I have a fixed-length data file need to persistence into database. I use a
I have one console app that is doing some lengthy syncing to an ftp
I've seen second one in another's code and I suppose this length comparison have
I have an @PostConstruct init() function in my backing bean that performs a lengthy
I have a field in my report that needs to have a length of
I have a protocol that requires a length field up to 32-bits, and it
I have a string of arbitrary length, and starting at position p0, I need
I have some numbers of different length (like 1, 999, 76492, so on) and
I have a string with a length that is a multiple of 8 that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.