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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:56:37+00:00 2026-05-24T05:56:37+00:00

I’m using Linq to SQL on a project and have read articles about how

  • 0

I’m using Linq to SQL on a project and have read articles about how inefficient the framework is. I’ve read that one way to drastically increase the performance is to create compiled queries. Would all queries perform better compiled? Or are there certain instances where it may not make much of a difference? I assume this is critical on large scale applications that get a high volume of traffic.

Thanks.

  • 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-24T05:56:38+00:00Added an answer on May 24, 2026 at 5:56 am

    I’ve run into this before. Compiling queries can be a great thing and does improve performance significantly. That is not always the best solution though.

    I was working on some reports that took 30-40 minutes to run. What I found was that we were calling certain queries hundreds and thousands of times. Compiling the queries did give improve things, but not nearly enough.

    What I ended up doing was running less queries that returned more data. This is less opening and closing connections. The results was reports that ran in less than a minute.

    So, if you’re having to run a query a few times, compiling it is a great option. If it’s running hundreds or thousands of times, you may just need a new approach.

    A few posts regarding these two things:

    SQL Query Optimization for Reporting: a Different Approach:

    http://www.foliotek.com/devblog/sql-query-optimization-for-reporting-a-different-approach/

    Unexpected Benefits of Precompiled Queries in Linq:

    http://www.foliotek.com/devblog/unexpected-benefits-of-precompilation-of-linq/

    One more thing to consider would be the indexes on your database. Your query is slow, but you don’t know why it’s slow. If it is searching on a column that is not indexed, then that could be your problem, too.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,

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.