Best practices for downsampling billions of rows of data