Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to speedup the execution of a query in Sql Server?

How to speedup the execution of a query in Sql Server?

Scheduled Pinned Locked Moved Database
databasesql-serversysadmintutorialquestion
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Abhijit Mindcraft
    wrote on last edited by
    #1

    How to speedup the execution of a query in Sql Server?

    M D L 3 Replies Last reply
    0
    • A Abhijit Mindcraft

      How to speedup the execution of a query in Sql Server?

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      In SSMS under tool the first entry is SQL Server Profiler - use that as your first step.

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • A Abhijit Mindcraft

        How to speedup the execution of a query in Sql Server?

        D Offline
        D Offline
        David Mujica
        wrote on last edited by
        #3

        You need to present a bit more detail so that some suggestions can be given. Generally, are you linking tables together ? How many? How many rows are in each table? How many rows are being returned in your query? With the SQL profiler you will be able to tell whether the server is scanning the table or seeking data via an index. Your question is too vague to get a valuable answer.

        A 1 Reply Last reply
        0
        • D David Mujica

          You need to present a bit more detail so that some suggestions can be given. Generally, are you linking tables together ? How many? How many rows are in each table? How many rows are being returned in your query? With the SQL profiler you will be able to tell whether the server is scanning the table or seeking data via an index. Your question is too vague to get a valuable answer.

          A Offline
          A Offline
          Abhijit Mindcraft
          wrote on last edited by
          #4

          Hi David Mujica, Thanks for your reply,but I need just rough idea or tips.

          M 1 Reply Last reply
          0
          • A Abhijit Mindcraft

            Hi David Mujica, Thanks for your reply,but I need just rough idea or tips.

            M Offline
            M Offline
            Mycroft Holmes
            wrote on last edited by
            #5

            My response was a tip, without more information we can't really be more specific. Statements like check you indexes (profiler helps) and check your syntax are going to be basically all we can do. Tuning a DB and queries is almost an art so you need to give us some subject matter. What you have given us is like asking why your painting is rubbish!

            Never underestimate the power of human stupidity RAH

            1 Reply Last reply
            0
            • A Abhijit Mindcraft

              How to speedup the execution of a query in Sql Server?

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              After checking your keys and indexes, you could try to omit as much functions in the query as possible, limit the case-when switches and remove any unused tables and/or columns. MSDN also has a few pages on the subject :)

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

              A 1 Reply Last reply
              0
              • L Lost User

                After checking your keys and indexes, you could try to omit as much functions in the query as possible, limit the case-when switches and remove any unused tables and/or columns. MSDN also has a few pages on the subject :)

                Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                A Offline
                A Offline
                Abhijit Mindcraft
                wrote on last edited by
                #7

                Hi Eddy Vluggen, It helps me a lot. :) :thumbsup:

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups