DEV Community

Jeff Zuerlein
Jeff Zuerlein

Posted on

Using T-SQL To Generate Large Amounts Of Test Data

Being able to generate millions of rows of data in your SQL database, in a few seconds, opens up a world of options.

It means you can validate your data access strategy, and UI design early in the development process. The goal is to fail fast, to minimize risk. Having a set of data that mirrors the size you expect in production means you’ll quickly see what works, and what doesn’t.

In cases where you need to have data that matches real world data, you could leverage open source datasets of names and locations to provide information that conforms to your software’s business rules.

ChatGPT can also provide sets of information that may not be accurate, but close enough for load testing.

I’ve created a video to discuss the benefits of testing an application with large sets of data, and provide a demonstration of T-SQL code that you can use in your own projects.

Top comments (0)