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 440177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:50:48+00:00 2026-05-12T20:50:48+00:00

Optimally I would like linq to use X database connections instead of 1 to

  • 0

Optimally I would like linq to use X database connections instead of 1 to speed things up.

The only way now is to open X connections, and create X databasecontexts, and associate them.
It would be easier if somehow I could tell linq to use X connections.

Is this possible? Or is there another way to speed up database queries?

thanks

edit: changed the title since it was misleading (according to one of the answerers, and I agree)

  • 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-12T20:50:48+00:00Added an answer on May 12, 2026 at 8:50 pm

    I think the title is misleading. Connection Pooling: You don’t need to do that. Linq2SQL uses an ADO.NET SqlConnection under the hood which is connection pooled by default.

    What you are trying to accomplish seems to me like trying to query the database in parallel. This can only beneficial if you are trying to execute different queries or a query that can be very well parallelized. Such a query also should not heavily rely on locks/transaction. Slow queries generally tend not to be of that kind.

    Loading the top 50% of the same query with one connection and the bottom 50% with another won’t bring you any benefits, the Database Server is the bottleneck there.

    There are a lot of other reasons why LinqToSql SQL queries perform bad. One of them is known as the Select N+1 problem. Ayende has a great post about fighting it in NHibernate, equivalent principles apply in L2S.

    If all of the above does not help you, you might want to take a look at SQL Server MARS that allows you to query a database in parallel on one connection.

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

Sidebar

Related Questions

I would like to use Linq and strongly typed views in the right way.
What would be the recommended method to create a table like display (columns, rows,
What would be the optimal way to develop a basic graphical application for Windows
What would be the optimal way to match that all of a set of
I was told that the optimal way to program in C++ is to use
I have been thinking about the optimal way to create an XML file using
Given a matrix A and B of same size, i would like to construct
I'm looking for a way, in python 3.2, to create a large number of
I would like to be able to parse a non-empty, one-or-many element, comma-delimited (and
I would like to find an iPhone OpenGL ES Example that responds to touch.

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.