Press "Enter" to skip to content

Curated SQL Posts

Azure SQL Database Startup Time

John McCormack has a tip for us:

The traditional methods used for to find the start up time for SQL Server don’t work in Azure SQL DB.

I searched high and low to find this and thought I’ve got to share, and hopefully make it search engine friendly. A traditional google or bing search wasn’t bringing up the best way to find this out. I saw a lot of complicated queries to pull data, convert it and estimate start up time using functions and all kinds of magic. 

Click through for the one-liner script.

Comments closed

Power BI Model Documentation

Marc Lelijveld reflects on an overlooked part of development:

I strongly believe that it is key to describe everything that you have built as part of your Power BI model. As we all have a hate-love relationship with documenting our work, the external tool that I build to document your Power BI solutions could come in useful. In particular everything you add and only exists in your model is important to describe properly. This documentation is key once you share your data model with others and they try to understand the goal of a measure, column or anything else. Other than that, documentation also comes in useful if you handover your solution to your colleague or client.

Read on to see what you can currently document.

Comments closed

Plotting Multiple Plots in R using map and ggplot

Sebastian Sauer gives us a quick solution to plotting one graph per variable:

Say we have a data frame where we would like to plot each numeric variables’s distribution.

There are a number of good solutions outthere such as this one, or here, or here.

When I read this, my first thought was along the lines of, “Why not use facets or something like cowplot?” But then it clicked that this is per-variable plotting, whereas faceting requires you choose a variable and see the plots based on that variable’s distinct values..

Comments closed

Image Sizing in RMarkdown Documents

The Jumping Rivers team shares some insight on image creation:

In this series of posts we’ll consider the (simple?) task of generating and including figures for the web using R & {knitr}. Originally this was going to be a single post, but as the length increase, we’ve decided to separate it into a separate articles. The four posts we intend to cover are

– setting the image size (this post)
– selecting the image type, PNG vs JPEG vs SVG
– including non-generated files in a document
– setting global {knitr} options.

Read on for the first post in the series.

Comments closed

More Number Series Generators

Itzik Ben-Gan continues a series:

This is the second part in a series about solutions to the number series generator challengeLast month I covered solutions that generate the rows on the fly using a table value constructor with rows based on constants. There were no I/O operations involved in those solutions. This month I focus on solutions that query a physical base table that you pre-populate with rows. For this reason, beyond reporting the time profile of the solutions like I did last month, I’ll also report the I/O profile of the new solutions. Thanks again to Alan Burstein, Joe Obbish, Adam Machanic, Christopher Ford, Jeff Moden, Charlie, NoamGr, Kamil Kosno, Dave Mason, John Nelson #2 and Ed Wagner for sharing your ideas and comments.

Read on for three more solutions, as well as a re-evaluation of the solutions in the first article.

Comments closed

5 Useful Tools for DBAs

David Fowler recommends five helpful tools and products:

Backups are easily the most critical part of any DBA’s job so having a reliable way of managing them is essential. There are various tools and scripts out there but easily top of the tree for me is Minion Backup from Minionware.

Controlled by a number of configuration tables, it makes sceduling backups and configuring them down to a really granular level dead easy. If you’re like me and you’ve got a large number of databases on a server that each need to run on different days, go to different locations and need to run with different settings, Minion is about the only tool that I’ve found that lets me control things how I want without needing 101 different agent jobs. All your backups are controlled from a single agent job and that’s what I really love about it.

I’ve always liked Sean & Jen’s products, and would also recommend their indexing and CHECKDB solutions. David’s other suggestions are great as well.

Comments closed

Powershell Tools and Excel Tips

Jess Pomfret shares a few useful Powershell modules and follows up with tips for maximizing your Excel game:

Since I’ve written a lot about PowerShell previously, I wanted to highlight some other tools that I depend on. I’ve always been a fan of Excel, my personal life is full of spreadsheets – most decisions end with a spreadsheet (lucky for me, my wife is also a big fan of Excel!).  I often find myself copying data into Excel to keep track of work, or to quickly analyse data.  It’s also a great way of sharing data with a clear structure.  I’m also a big fan of shortcuts – so here’s a few I use often.

Jess also reminds me that it’s about time to tune up the bicycle…

Comments closed

Tooling Outside of SQL Server

Dave Mason shares a few useful tools::

I’m a proponent of “Show me, don’t tell me”. Screen captures go a long way toward that. Sure, Windows has Paint, but Paint.NET is a bit more advanced. I almost always have an instance of it open in the background. Hit the Print Screen keyboard button and paste (CTRL + V) it into Paint.NET (you can also use the ALT + Print Screen key combination to screen capture just the active window). From there you can do anything: trim down to just a specific part of the image, add some red arrows or circles for emphasis, blur/obscur any sensitive data that’s in the image, etc. I take tweaked screen shots and paste them into just about anything…Word documents, email, even Twitter.

As far as it goes, I think I use different tools than Dave across the board, save for 7Zip. I like Notepad++, SnagIt, WinDirStat, LastPass, 7-Zip (yay for agreement), and mRemoteNG, and despites headphones respectively. But that goes to show that there are plenty of good alternatives for products and it’s worth trying a few out.

Comments closed