Just coming from a wonderful week at PASS Summit. I sat in two separate sessions where this trick came up and watched as people furiously wrote it down. Did you know that you can set a query to run multiple times in one command? All you have to do is add “Go” and the number of times you want it to run. For example:
SELECT GETDATE() GO 5
Will return something like this:
Super cool, right? It was mentioned in both Brent Ozar’s and Argenis Fernandez’s presentations and I didn’t want to forget. Now you can easily run your queries more and create load on your test system without having to click run over and over again.
Today’s post features Lyrics from Panic! At the Disco’s Cover of Carry On My Wayward Son
SO MANY people always write that down, and I’m all, “Why do you want to do that to your poor SQL Server?!? I just taught you a bunch of indexing stuff and you didn’t write anything down, and you wrote THAT down?!?”
It made me laugh too! I learned it a few years ago, but seeing everyone go nuts made me take note. Your presentation was awesome and I am excited to use it to show our engineers how we can be better. Thank you for being you!
Awww, you’re welcome! Glad you liked it.