Forum Discussion

RUDOLF_BOTHMA's avatar
RUDOLF_BOTHMA
Community Hero
5 years ago

How to measure SQL hits due to my application

Use case:

 

I'm working on a form in development environment and everything works fine. aqPerformance tells me everything is quick.  I make a change in my form.  aqPerformance still tells me everything is quick.  Users suddenly report that everything has slowed down and the system is unusable and they want me to personally drive over to their offices and make coffee while they wait for the form to load.  After testing, I find that the small change in my form suddenly added 200 SQL queries each time you move your mouse.  This isn't a problem in production or our test servers, but the users are on a network with high latency.  Each single SQL connection is quick, but it adds up.

 

Is there a way to monitor these SQL hits by, say, using profiler and profiling during the form load/ item select etc. then report back the amount of SQL queries ?  I know developers could keep profiler open while developing the application, but sometimes it doesn't behave the same on you machine as on live and you want to know if something has dramatically changed.  Also, if you could catch this before it gets to users that would save alot of fuel.

6 Replies

    • RUDOLF_BOTHMA's avatar
      RUDOLF_BOTHMA
      Community Hero

      I've had a quick look at it - and attended AQTime training academy 101 :smileytongue: I can see that it would allow me to look at performance on a global scale.  It's big on the application side, but I don't see much on the SQL side.  I can't see any indication that it would be able to do someting like error my test if SQL performs more than X queries between the button click and the page being ready after the click.  Any experience that would confirm or deny my limited exposure to help me decide if I should use AQTime or write some sort of custom server side profiling scripts (I've got an idea involving stored procedures, xml files,SQL built-in functions and a touch of roasted fennel to make that work...). I'd prefer the former, but would be prepared to do the latter.  I just need input before I go and do redo something TC/AQTime can already do

    • RUDOLF_BOTHMA's avatar
      RUDOLF_BOTHMA
      Community Hero

      Thanks, I'll ask.  I'm just genuinely surprised that nobody else has wanted to measure this in the middle of test runs :smileysurprised:

       

      Just putting in a timer checkpoint can't tell me if a code change is going to kill a SQL server with redundant/multiple calls to the database.  Our application by neccesity has to share a SQL server with other applications and there are too many instances of "Your software made all our other software break" to ignore this.