SQL Server and SqlDataReader - Trillion Records - Memory

后端 未结 3 1925
栀梦
栀梦 2021-01-05 17:14

I\'ve never tried this - so I don\'t know if I\'d run into memory issues.

But can a SqlDataReader read a trillion records? It\'s all streamed correct? I\'m a little

3条回答
  •  执笔经年
    2021-01-05 17:49

    Yes, that will stream... but I don't think you should actually try to do it.

    If you could read a million records per second (which sounds unlikely to me) you'd still need 12 days to read a trillion records... that's a lot of work to risk losing half way through.

    Now I realise you probably don't really want to read a trillion records, literally, but my point is that if you can separate your "large amount" of work into logical batches anyway, that's probably a good idea.

提交回复
热议问题