GoGreen PC Tune-Up™
Learn More

Insta-Install™
this is how ssl encrypt our websites
MTNCOMP | List View | Table View | myBlog (1830 Entries)
myBlog Home

Blog


SQL Server and 1 Trillion records continued

SQL

by Mountain Computers Inc, Publication Date: Saturday, July 5, 2025

View Count: 432, Keywords: SQL, 1 Trillion, C#, BCP, SSMS, Hashtags: #SQL #1Trillion #C# #BCP #SSMS



If you are going to try different methods to generate 1 trillion records, one can try the following:
 
Visual C# and BCP at 50 000 records per second with and without parallelism
with ~ .16 years (16 lanes) and without ~2.6 years (1 lane)
 
the latest testing as of this date, going back 2-3 weeks, now ~300 billion records can be created in about 4 hours using the new GUID method. 
 
here are more details using the old method.
 
SSMS Solution at ~8000 records per second
use trillion
select count(*) from trillion_rows
select top 10000 * from trillion_rows where row_id > 211000000 - 10000
select top 10000 * from trillion_rows where row_id > 19991000
select top 10000 * from trillion_rows where row_id > 29991000
select top 10000 * from trillion_rows where row_id > 29991000
select top 100 text1 from trillion_rows where row_id > 29991000 and row_id < 29991000 + 100
select top 1000 text1 from trillion_rows where row_id > 31992000 and row_id < 31992000 + 1000
select * from trillion_rows where row_id = 45124658
select * from trillion_rows where row_id = 80913316
select * from trillion_rows where row_id = 44000000
select * from trillion_rows where row_id = 245000000
select * from trillion_rows where row_id = 750000000
select * from trillion_rows where row_id = 1200000000
select * from trillion_rows where row_id = 25000000000
select * from trillion_rows where row_id = 531005000000
select * from trillion_rows where row_id = 750000000000
select * from trillion_rows where row_id = 800000000000
select * from trillion_rows where row_id = 900000000000
select * from trillion_rows where row_id = 909000000000
select * from trillion_rows where row_id = 1000000000000
select * FROM sys.dm_io_virtual_file_stats(NULL, NULL);
select 100000000 - 10000000

-- benchmark times
--  10 000 000 records, 10 million, ~16 minutes
-- 100 000 000 records, 100 million, ~1 hour 29 minutes
-- 100 000 000 000 records, 100 billion records, ~6 hours 15 minutes
--   1 000 000 000 000, 1 trillion records, ~28 hours

more to come...

if you found this article helpful, consider contributing $10, 20 an Andrew Jackson or so..to the author. more authors coming soon
FYI we use paypal or patreon, patreon has 3x the transaction fees, so we don't, not yet.

© 2026 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.