Query throttling tools

Jonathan Swenson · Friday Demos · March 28, 2025 · 4:35

A full UI for managing database load. We've layered in new tools for per-database and per-user throttling, making sure no one person can overwhelm the database.

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. all righty um let's see me share my window um I've been off working on a bunch of throttler and orchestrator and complicated job planning and whatnot related stuff and one of the things that I sort of I wanted to make sure that we had sort of the tools we needed to figure out what's going on when things are going on um say maybe you have a bunch of jobs that aren't running um or things are stuck and try to make sure that either we want to kill jobs to you know make sure that things can continue or have some idea of what's running so that we can go figure out like oh yeah this query is slow let's go to the detail um maybe tying

  2. into some of the stuff that Kai showed with his analytic stuff we will also want to Plum in some of that information I don't have it here yet but um one of the things I have this really nice dashboard with lots of tiles on it um that all sleep for a long time and if I run this I can see that um have 10 stages running out of 30 that's allowed interesting 13 throttled stages I want to go take a look at my child throttler I can see 10 of 20 in my connection um throttler I can go to the child throttler see that there's 10 of 10 okay so I'm being throttled on the the user I can come in here and I can

  3. actually say like actually want to run 20 of these now at a time it will now kick off the other 10 queries I can see that I'm running 20 or 20 there's still a couple throttled behind the scenes um I can make this 25 it still sticks at 20 because now we can see that the user is throttling us here the the connection is throttling here I can bump this up to 25 and now everything is running um there's just sort of like ways to get us out of U sticky situations or allow um the system to run more temporarily if that's something you want to do of course I'm I'm kind of curious what these slow queries are so I can pop in here

  4. obviously UI skills are terrible I can see here that U you know here I have a model query it's using the Sleep value field uh it's got a you know filter value of 90 interesting I can see the SQL that's actually executing um and in the case of this one will take a while so because it takes 90 seconds but you can also see after the fact for a little bit of time after the query has completed that it will tell you what had happened when the query completed and we theoretically tell you the same metrics that that Kai was showing that has something like how long it took whatever we can go back in in time and to see what happened sort of these

  5. bits and pieces to kind of work you can see we're burning down the number of throttl I can actually bring this step down to let's say 10 connection throttler at a time it won't stop anything if you do that but it will limit new new things from starting it'll sort of allow us to temporarily increase the the limits that we want to to in have in place here and the real the real reason for this sort of system is that you may not want to have a single connection running 10,000 queries at one time it may overwhelm your database it may cause more problems and you would actually like to handle some database Technologies do a much better job at making sure that they don't

  6. overwhelm themselves by um intelligently queuing things and some don't so if you try to run uh 10,000 queries against postest at the same time nothing will nothing will ever complete um so you may want to limit how many connections are actually being connected to your database at one time um and we will do some smart queuing of course if you then limit how many connections you can make um and then one user wants to use up all the connections then you have a problem so that's why there's this hierarchy of connection throttler and user throttl so for example a user can only use I I've just picked numbers here but uh user can only run 10 queries at a time the connection can only run

  7. 20 queries at a time um so one user can't use up all of them now all of these things are probably going to be configurable in some way shape of form and the numbers are I just pick something to play with but it will sort of allow us to make sure that this system is not only protecting us and our customers databases against um High query loads but also figure out what's going on when it's Happ