1 Reply Latest reply on Feb 11, 2015 4:30 PM by brianflynn

    SQL Hash wrong SQL Text


      In our monitor, we see a SQL statement that creates a large Wait Time.

      But that statements is unused, it is called nowhere. Even when we delete the statement from our database, it's still present in the monitor.


      So I started searching why that was, and this is what I found.

      First I got the SQL Hash, that is easily found in the overview:


      Then I went to the current session overview, and I looked for the same SQL Hash:


      Then I used this query to find the SQL Text:


      And then I found out that it was actually an other statement. What also caught my eye, is that both statements where the only ones that didn't have 'Average (seconds)' nor 'Executions' available.


      So my first question is: is my above stament correct? If so, I know which statement to optimize.

      And does anyone has an idea how to reset the SQL Text & start monitoring the Executions again?

        • Re: SQL Hash wrong SQL Text

          pieterbs,On your first question.  Based on your description, I believe you are right.

          Regarding why this happened: You might want to buy a lottery ticket tonight.  :-)  You've touched a rare weakness in our hashing algorithm.  While rare overall, there's a chance your environment has a greater proclivity for a hashing collision.  If this is the only time you've seen this, then maybe you'll be content to dismiss it as a fluke.  But if this has happened more than once, then I suggest you open a support case.


          Regarding resetting the SQL Text...  Possible, yes.  But please open a support case as making changes to the repository can be dangerous.  I've spoken with the Support Manager so he is aware of this and will know how to help you.