Download the Current Stack Overflow Database for Free (2021-06)


Stack Overflow, the place where most of your production code comes from, publicly exports their data every couple/few months. @TarynPivots (their DBA) tweets about it, and then I pull some levers and import the XML data dump into SQL Server format.

Stack Overflow’s database makes for great blog post examples because it’s real-world data: real data distributions, lots of different data types, easy to understand tables, simple joins. Some of the tables include:

Badges: 40,338,942 rows; 592.8MB Comments: 80,673,644 rows; 14.4GB PostHistory: 141,277,451 rows; 242.0GB; 221.9GB LOB Posts: 53,086,328 rows; 137.6GB; 26.1GB LOB Users: 14,839,627 rows; 1.4GB; 4.5MB LOB Votes: 213,555,899