When my Application is UP SQL server is Slow

  • Query Runs slow when the system usage is at high.

    I have sql server 2008 with 3 GB RAM and 2 GB RAM for my application.

    When my application is running i see my system is almost 100% most of the time.

    and if i see SQL server it is taking almost 2GB of allocated data (it is ok).

    but when i try to Query a select statement from table during my application is up it takes around 20-30 sec to return the output, where as when my application is not running i see the same query returns in less than a second.

    my question is we have allocated memory for SQL server then why it is slow?

    what causing here to slow?

    my application will start and connect to database only after 5 min. during that 5 min of time my query is very slow why? even we have dedicated memory allocated to sql server why it is so.

    Why sql server is relying on other process?(even though it is having it own memory to do)

  • What kind of application you are using on database server? As best practice microsoft recomend to have dedicated database server.

    Check for any hardware bottlenack. Are you facing issue for specific proc or all proc?

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • free_mascot (5/21/2014)


    What kind of application you are using on database server? As best practice microsoft recomend to have dedicated database server.

    Check for any hardware bottlenack. Are you facing issue for specific proc or all proc?

    my application was developed on vc++ and C# only.

    it is not specific with one proc, just a select statement is not working (even on system tables).

    but why it is taking more time only during my application launch? even pre-allocated memory is there for SQL server.

  • but why it is taking more time only during my application launch? even pre-allocated memory is there for SQL server.

    You mean once your application launch everything become normal?

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • free_mascot (5/21/2014)


    You mean once your application launch everything become normal?

    Opposite ...abnormal

    on launching my app my sql server query runs slow. before launch it normal

  • In that case looks like resource crunch on the server. Check your server for any harware bottlenack.

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • 3gb of RAM for SQL Server and your application? That's an extremely small amount of memory to run SQL Server 2008 within. You must be seeing contention on resources.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • 3GB for SQL server and 2 GB for Application

  • Have you run the likes of perfmon and SQL Profiler etc to see what happens on the box before and during startup of your application? This should give you a good idea of what resources are being consumed (CPU, Memory, Disk, Paging etc)

    You should be able to see why your queries are running slow (SQL will tell you) using DMVs, Activity Monitor, Adam Mechanics [sp_WhoIsActive] etc

  • My application is taking rest of the memory and the CPU is high when it get launched.

    my question is if sql is allocated with 3 gb of RAM why it is depending on other process?

    Database is standalone in my application.

  • I'd put SQL Profiler on it, briefly. See what's being thrown at SQL Server. See if you have a load of n+1 (and/or other antipatterns) implemented by a muppet.

    If that's your problem, you can throw memory at it to ameliorate it to a degree. But it'll always be a pig in a poke and it's not going to scale

    I'm a DBA.
    I'm not paid to solve problems. I'm paid to prevent them.

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply