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

  • SEARCH
  • Home
  • 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 6979035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:50:03+00:00 2026-05-27T17:50:03+00:00

If I have about 2000 record and I make a multiple insert. Which method

  • 0

If I have about 2000 record and I make a multiple insert. Which method has better performance than the other?

  • connection with each single insert .and close after the insertion .
  • one connection for the whole bulk and close the connection at the
    end. and what about the connection timeout in this case.

Notes :

  • The database is informix db.

  • It takes about 3.5 to 4 minutes to insert about 6000 record.(with the
    first method)

  • 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-27T17:50:04+00:00Added an answer on May 27, 2026 at 5:50 pm

    Application connection pooling will largely make this question irrelevant as c# application pools are optimized for multiple calls to the same database.

    That said, what I do conforms to the following rule:

    If you can open a connection and then do multiple operations by use of the “using” syntax:

    using (SqlConnection connection = new SqlConnection(connectionString))
    {
        connection.Open();
        // Do work here; connection closed on following line.
    }
    

    Then keep the connection open and do all your operations.

    If however, each record is manipulated and then saved in such a fashion that you have to open a new connection at each point, don’t fret overmuch. You’ll still perform great with connection pooling.

    From MSDN:

    http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx

    To deploy high-performance applications, you must use connection pooling. When you use the .NET Framework Data Provider for SQL Server, you do not have to enable connection pooling because the provider manages this automatically, although you can modify some settings. For more information, see SQL Server Connection Pooling (ADO.NET).

    Even if your connection isn’t the SQL one, the built in connection providers for the other sources behave in similar manner.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At the moment I have about 2000 trades which are priced using excel. I
I have a Silverlight application which loads about 2000 objects of half a dozen
I have about 2000 lines of javascript code for my application. A lot of
I have a directory with about 2000 files. How can I select a random
I have a data source with about 2000 lines that look like the following:
I have a scene in my WPF project with about 2000 different user controls:
I have a table with about 1000 records and 2000 columns. What I want
I have the following situation. I have a database of transactions about multiple contracts.
I have a directory that contains about 2000 text documents and I want to
i have this string ++++++1DESIGNRESULTSM25Fe415(Main) and i have similar string about 2000 lines from

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.