0

I know basic SQL/RDBMS and not the kind of detailed information a highly experienced DBA would know.

I need to know how much memory is consumed by a variable such as int, bigint, date time. I also need to know how much memory is consumed by a Varchar(50) column in two cases -

1] The Column is filled with strings of size 50
2] Column has all Null

The purpose behind this is to make estimates for ETL/data transfer.

I also want to know how to store SQL server result into a cache on disk and then retrieve the data from that cache, chunk by chunk (doing this due to memory related concerns). But, I'll make that another question.

4

1 回答 1

2

除了注释中链接的文档之外,请注意varchar存储取决于实际输入的数据。

来自http://technet.microsoft.com/en-us/library/ms176089(v=sql.100).aspx

存储大小是输入数据的实际长度 + 2 个字节。

于 2013-10-23T22:48:15.920 回答