DATABASE SLOW

  • Hie,

    can any one help me what are the steps to b take when database is running slow?

  • There are many reasons why your Db might be slow.,

    chcek if there is any long running transaction using DBCC OPENTRAN ('DBNAME') , if u r DBA get ur dev and ask him about this transaction and if it all it can be kill, kill the transaction else wait for its course to complete , check your network latency, u r temp db , if mirroring is transactional u need t ocehck ur mirroring status,

  • Is this an interview question, by any chance? What research have you done?

    John

  • rajluves (7/3/2013)


    Hie,

    can any one help me what are the steps to b take when database is running slow?

    This is a huge subject and runs the full gambit from which hardware and operating system are installed, whether or not VM is being used or not, how SQL Server was installed and what settings it has been setup with, how the hard-disks have been formatted and partitioned, how the databases has been setup for growth, how the tables are designed, how the indexes are designed, how the queries are written, how DB maintenance is done, etc, etc, etc and even includes the number of sun spots and the position of the moon. 😉

    My recommendation is to take Step 1 and get some training if you're going to do the job of a DBA. If that's out of the question, consult with my personal "Assistant DBA"... His name is "Google". Tell him you want information on "steps to take when DB running slow". In the process, you'll also learn, which takes us back to Step 1.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • You might want to take a look at this book if you're going to take care of the database

    Troubleshooting SQL Server: A Guide for the Accidental DBA[/url]

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Generally it is because of Blocking, space issues, IO issues, Index maintenance (Fragmentation), Update stats,High CPU Usage, High Memory Usage.

    Check the execution plan of the query and confirm whether it is using table scan or index scan

    Check the missing indexes

    If table scan is followed suggest them to create necessary indexes.

    Check for number of joins used in query and eliminate un necessary joins

    Check for fragmentation and fix it if exists

    Thanks,
    I’m nobody but still I’m somebody to someone………….

  • I have the perfect answer for your question as you asked it.

    Find a DBA and have them look at it.

    Your question and the way it was asked is like asking

    "I feel sick what should I do?" to a medical forum.

    If you are sick and you have no clue seek a doctor.

    If your Database is sick and you no clue seek a DBA.

    😎

  • Please define what you mean by "slow". What are the exact symptoms? What is the db doing that it doesn't normally do? What troubleshooting have you done so far?

  • ahperez (7/8/2013)


    Please define what you mean by "slow". What are the exact symptoms? What is the db doing that it doesn't normally do? What troubleshooting have you done so far?

    Agree with this statement... What is running slow? Is it a insert? A certain stored procedure? First step is to find out what is running slow then if you don't know what sql is being run I would run the sql profiler and see what statements are being run and which ones are slow... Then look at the code and see what can be done to make it run faster. May need to look at the server also... Is it a vm, does it have slow disks, low memory, when was sql last restarted. Lots of variables to look at with out more information...

  • Have you tried rebooting?

  • Voide (7/11/2013)


    Have you tried rebooting?

    PHYData DBA


    "I feel sick what should I do?"

    Have you tried to use a scalpel? 🙂


    Alex Suprun

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

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