Windows Vista Forums

linq troubles

  1. #1


    Raphael Gomes Guest

    linq troubles

    Greetings,

    I've been using linq to sql in a web project that uses tables with
    about 1 million records each. Recently, we found the server freezing
    and we're isolating the problem in the ms sql server, which is hogging
    up resources (memory and processor).

    I did a quick readying about the subject, and couln't find where do I
    set up linq to free the used resources. Also, regarding the queries,
    how do I ensure that linq is being efficient?

    Thanks in advance,



      My System SpecsSystem Spec

  2. #2


    MBUnit Guest

    Re: linq troubles

    Raphael Gomes wrote:

    > Greetings,
    >
    > I've been using linq to sql in a web project that uses tables with
    > about 1 million records each. Recently, we found the server freezing
    > and we're isolating the problem in the ms sql server, which is hogging
    > up resources (memory and processor).
    >
    > I did a quick readying about the subject, and couln't find where do I
    > set up linq to free the used resources. Also, regarding the queries,
    > how do I ensure that linq is being efficient?
    >
    > Thanks in advance,
    You should look up Linq-to-SQL and lazy loading as opposed to immediate
    loading.

    You can use a tool like Link-to-SQL Debug Visualizer that allows you to
    look at the formulated inline SQL a Ling-To-SQL query creates before it
    is executed.

    Are you using the USING statement to open the database connection, which
    you can do with Linq-to-SQL.

    Also, you can look-up Linq DataContext and Dispose.


      My System SpecsSystem Spec

  3. #3


    Cor Ligthert[MVP] Guest

    Re: linq troubles

    Raphael,

    Linq is there to select the rows from your tables (and not more) which you
    need. I can me not imagen that you need 1 million rows on a webpage.

    Cor

    "Raphael Gomes" <ralgomes@xxxxxx> wrote in message
    news:a0b3148d-30bd-4913-9c6b-49baa64b2d4e@xxxxxx

    > Greetings,
    >
    > I've been using linq to sql in a web project that uses tables with
    > about 1 million records each. Recently, we found the server freezing
    > and we're isolating the problem in the ms sql server, which is hogging
    > up resources (memory and processor).
    >
    > I did a quick readying about the subject, and couln't find where do I
    > set up linq to free the used resources. Also, regarding the queries,
    > how do I ensure that linq is being efficient?
    >
    > Thanks in advance,

      My System SpecsSystem Spec

linq troubles

Similar Threads
Thread Thread Starter Forum Replies Last Post
LINQ to XML - what am I doing wrong omnistead .NET General 0 13 Mar 2010
getting cr/lf out of xml with linq to xml? dave .NET General 0 12 Jun 2009
Linq to SQL kazik .NET General 1 24 Mar 2009
LINQ to XML Add Nodes? coconet .NET General 0 24 Feb 2009
Powershell & LINQ dm_14 PowerShell 0 22 Jan 2008