DBA.StackExchange.com is a Stack Overflow site that’s specifically targeted at database administrators. There tend to be some pretty interesting questions in there – not just for SQL Server, but all kinds of databases – but at the same time, there’s also a lot of noise.
To help find fun questions, I use The Power of SQL™. Data.StackExchange.com is a web-based front end, kinda like SSMS, that lets you run queries against a recently-restored copy of the Stack Overflow databases. It’s different from the downloadable Stack Overflow database because it’s updated much closer to real time, and you don’t have to hassle with downloading it each time it’s updated.
Here are some of my favorite queries:
Recent Unanswered Questions Sorted By Views – I find views to be a good way to gauge questions: if other people find it interesting enough to click on, then I’m probably gonna feel that way too. There are parameters to let you choose how far back you want to look (say 9999 for tons of history if you wanna unearth an artifact), and a parameter to ignore specific users (like my own questions, or people whose questions I don’t really find that interesting.) Columns include:
- Score – how popular the question is
- AnswerCount – how many answers have already been posted (but not accepted as correct)
- TopAnswerScore – because sometimes the community really likes an answer, but the asker hasn’t bothered to accept it yet
- BodyLength – because I’m often interested in questions where the asker put in a lot of effort. Similarly, I’m interested in long answers, which brings me to…
Recent Long Answers – A long answer isn’t necessarily good, so I also include the score in the output column. However, I’m usually curious about what drove someone to type tens of thousands of characters into the answer box. I usually don’t even care what database it’s about – when someone writes that much, I want to at least glance at it to see what’s going on. Here are a few recent examples:
- Getting a truly random row from a PostgreSQL table quickly: 21,177 characters covering several different solutions in exhaustive detail.
- What controls SQL Server’s page file usage: I mean sure, I immediately discard the title as something I’m not interested in, because in the year 2020, you shouldn’t be paging to disk anyway. But if somebody’s gonna write 11,660 characters on the topic, I’m gonna at least scan it.
Most Interesting Recent Comments – because sometimes the real fun is in the peanut gallery, like when Andy Mallon says he once saw a table named dbo.tblTable.
You can use all of these queries on any Stack Overflow network site. When you’re looking at the query, just look in the parameter section and start typing in the “Switch sites” box.