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. speed up query

speed up query

Scheduled Pinned Locked Moved Database
databasehelpperformancequestion
6 Posts 2 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.
  • R Offline
    R Offline
    rcwoods
    wrote on last edited by
    #1

    Hi I hav a problem with my stored procedure, its taking far too long. I have used simple JOIN statements, but unfortunately I have 7 tables to JOIN and therefore 6 JOIN statements in this one procedure. There is also a simple SUM calculation happening within this query as well. But this procedure is takin far too long to get the results. Was going on 18 minutes and counting when i cancelled it. :( Can anyone help me out?

    P 1 Reply Last reply
    0
    • R rcwoods

      Hi I hav a problem with my stored procedure, its taking far too long. I have used simple JOIN statements, but unfortunately I have 7 tables to JOIN and therefore 6 JOIN statements in this one procedure. There is also a simple SUM calculation happening within this query as well. But this procedure is takin far too long to get the results. Was going on 18 minutes and counting when i cancelled it. :( Can anyone help me out?

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Show the code for the stored procedure, along with the database table structure/schema and someone might be able to shed some light for you.

      rcwoods wrote:

      Was going on 18 minutes and counting when i cancelled it.

      How many records do you expect it to return?

      "Find it your bloody self - immediately!" - Dave Kreskowiak

      R 1 Reply Last reply
      0
      • P Paul Conrad

        Show the code for the stored procedure, along with the database table structure/schema and someone might be able to shed some light for you.

        rcwoods wrote:

        Was going on 18 minutes and counting when i cancelled it.

        How many records do you expect it to return?

        "Find it your bloody self - immediately!" - Dave Kreskowiak

        R Offline
        R Offline
        rcwoods
        wrote on last edited by
        #3

        Thanks for the reply, I think i figured out what was wrong. It was expected to return alot of records.in the high thousands. Thanks again for reply

        P 1 Reply Last reply
        0
        • R rcwoods

          Thanks for the reply, I think i figured out what was wrong. It was expected to return alot of records.in the high thousands. Thanks again for reply

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          Out of curiosity, how many thousands of records? Sounds like 18+ minutes is still way too long.

          "Find it your bloody self - immediately!" - Dave Kreskowiak

          R 1 Reply Last reply
          0
          • P Paul Conrad

            Out of curiosity, how many thousands of records? Sounds like 18+ minutes is still way too long.

            "Find it your bloody self - immediately!" - Dave Kreskowiak

            R Offline
            R Offline
            rcwoods
            wrote on last edited by
            #5

            i think it was more about my query..i can see now that i need a subquery.

            P 1 Reply Last reply
            0
            • R rcwoods

              i think it was more about my query..i can see now that i need a subquery.

              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #6

              Glad you got it to work :-D

              "Find it your bloody self - immediately!" - Dave Kreskowiak

              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