4 ms·
Can someone give me a specific use case for this? As "check how a query behaves on a large table" is very vague to me. E.g. I have a table structure but not al
by alexf95 6y ago
Can someone give me a specific use case for this? As "check how a query behaves on a large table" is very vague to me.
E.g. I have a table structure but not alot of rows in it, so i go use this to get alot of rows in to check how fast queries get processed?
- unnouinceput 6y agoExactly like that, yes.
- DasIch 6y agoYou want to run a transaction in production and you're unsure about the impact because it might take a lock and block other transactions for some time. In that case you may want to spin up a separate database with fake data and test it there first. You could create a new database and restore a production backup instead of using fake data but that might not be allowed or require some kind of approval due to rules protecting the privacy of customers or employees.
- dspillett 6y agoGenerating test data batches like this is a common use. The other is for populating "numbers tables" which can be very useful in reporting contexts and/or dealing with certain gaps/islands type problems. You can even use the techniques dynamically rather than a stored numbers table, if you need it in a DB that doesn't have one and you don't have schema permissions to create one, though this is generally less efficient.
- psing 6y agoCreating realistic fake data is useful in lower environments and for load testing. Outside of SQL I like faker: https://github.com/joke2k/faker https://github.com/joke2k/faker