Category: Stack Overflow

Updated, Larger Stack Overflow Demo Database

Stack Overflow publishes a data dump with all user-contributed content, and it's a fun set of data to use for demos. I took the 2024-April data dump, and imported it into a Microsoft SQL Server database.

It's an 31GB torrent (magnet) that expands to a ~202GB database. I used Microsoft SQL Server 2016, so you can attach this to anything 2016 or newer. If that's too big, no worries - for smaller versions and past versions, check out my How to Download the Stack Overflow Database page.

Read more about Updated, Larger Stack Overflow Demo Database 9 comments — Join the discussion

Updated Stack Overflow Public Data Set for June 2019

Taryn and the kind folks at Stack Overflow have updated their public XML data dump for June, so I've imported that into an updated sample database for your blogging and presenting satisfaction.

You can download the 40GB torrent (magnet) and it expands to a ~350GB SQL Server 2008 database. Because it’s so large, we only distribute it with BitTorrent – if you’re new to that, here are more detailed instructions.

Read more about Updated Stack Overflow Public Data Set for June 2019 5 comments — Join the discussion

A Presenter’s Guide to the Stack Overflow Database

You present on SQL Server topics at user groups and conferences, and you've been wondering how to get started with the Stack Overflow public database. Here's a quick list of things to know.

For stable demos, use StackOverflow2010. This smaller 10GB database has data from the first years of Stack Overflow's history. It doesn't change, so you don't have to worry about updating your screenshots and metrics every time Stack releases a new data dump.

Read more about A Presenter’s Guide to the Stack Overflow Database 4 comments — Join the discussion

New Stack Overflow Public Database Available (2018-06)

@Taryn and the kind folks at Stack Overflow publish their data export periodically with your questions, answers, comments, user info, and more. It's available as an XML data dump, which I then take and import into SQL Server for teaching performance tuning. You can download the 38GB torrent (magnet), which gives you a series of 7Zip files…

Read more about New Stack Overflow Public Database Available (2018-06) 5 comments — Join the discussion
Performance Tuning

Creating Basic Indexes on the Stack Overflow Public Database

My public SQL Server database copy of the Stack Overflow data dump only includes clustered indexes by default. I want to keep your database size as small as possible for quick downloading.

But like any database - when you create it, should you add your own indexes to make queries go faster? The answer lies in knowing your workloads, but we don't usually know our database workloads until they start.

Read more about Creating Basic Indexes on the Stack Overflow Public Database Be the first to comment

New Stack Overflow Public Database Available (2017-06)

Nick Craver and the kind folks at Stack Overflow publish their data export periodically with your questions, answers, comments, user info, and more. It's available as an XML data dump, which I then take and import into SQL Server for teaching performance tuning.

You can download the 16GB torrent (magnet), which gives you a series of 7Zip files that you can extract to produce a 118GB SQL Server 2008 database. You can then attach it to any 2008-2017 SQL Server.

Read more about New Stack Overflow Public Database Available (2017-06) 5 comments — Join the discussion

How to Download the Stack Overflow Database

I use the public Stack Overflow data export for my blog posts and training classes because it's way more interesting than a lot of sample data sets out there. It's easy to learn, has just a few easy-to-understand tables, and has real-world data distributions for numbers, dates, and strings. Plus, it's open source and no charge for you - just choose your size:

Read more about How to Download the Stack Overflow Database 222 comments — Join the discussion

Update on Stack Overflow’s Recovery Strategy with SQL Server 2014

Back in 2009 (wow, seems like only yesterday!), I wrote about designing a recovery strategy for Stack Overflow. Back then, I wrote: With these answers in mind, Stack Overflow’s decisions not to do transaction log backups, offsite log shipping, database mirroring, and so on make good business sense. Us geeks in the crowd may not like it,…

Read more about Update on Stack Overflow’s Recovery Strategy with SQL Server 2014 2 comments — Join the discussion

Microsoft SQL Server 2012 Always On AGs at StackOverflow

I recently finished helping the StackExchange team migrate their SQL Server 2008 infrastructure to SQL Server 2012. These servers power StackOverflow, DBA.StackExchange.com, the new AskPatents partnership with the US Patent and Trademark Office, and hundreds of other Q&A sites that together form one of the biggest web site networks. It's one of the most visible…

Read more about Microsoft SQL Server 2012 Always On AGs at StackOverflow 25 comments — Join the discussion
Production DBA

How to REALLY Compress Your SQL Server Backups

StackOverflow's database servers are hosted in a colo facility. They pay by the byte for transfer in and out of their servers, so it's really crucial to compress the database backups as much as possible. The smaller the backups, the less they pay. They're already using backup compression, but they wanted to explore more ways to cut their backup sizes.

Read more about How to REALLY Compress Your SQL Server Backups 45 comments — Join the discussion
Production DBA

Designing a Recovery Strategy for StackOverflow

When I design a backup & recovery strategy for a database, I don't talk to the developers, database administrators, or systems administrators first.  The first people I go to are the business managers, and I ask three questions:

How much money would you lose if you lost the data altogether?
How much money would you lose if you were down for X hours?
How much time & money can you afford to devote to backups?

Read more about Designing a Recovery Strategy for StackOverflow 11 comments — Join the discussion