# Real Type

Using approximate data types such as float and real can save lots of storage when the exact number is not required. In case of performance data this is not a problem even if we are out by few KBs in a GB scale.

For example, reading file statistics `sys.dm_io_virtual_file_stats` gives the following value for `num_of_bytes_read`:

1447418880

In a Real data type this would be:

1.447419E+09

Quick conversion to Mega Bytes reveals negligible loss of accuracy:

![](https://3496302873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LamHUpIpVXoBUUDZZpO%2F-Ls2QRSLa3ZLrhLKEdfN%2F-Ls2RMqsAF53sOev1hR5%2Fimage.png?alt=media\&token=3ec05a46-6137-461a-84ff-5ddd4725ac5a)

![](https://3496302873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LamHUpIpVXoBUUDZZpO%2F-Ls2QRSLa3ZLrhLKEdfN%2F-Ls2RRTiFA9y_FVbdwHS%2Fimage.png?alt=media\&token=e71edadc-40ea-4aee-b539-2c76f94e97a8)

Taking it one step further and simulating even larger number:

![](https://3496302873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LamHUpIpVXoBUUDZZpO%2F-Ls2QRSLa3ZLrhLKEdfN%2F-Ls2Rt4kkzK2SqHDlgmg%2Fimage.png?alt=media\&token=5b033bfc-ef67-4739-a6ce-b33733f7df42)

![](https://3496302873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LamHUpIpVXoBUUDZZpO%2F-Ls2QRSLa3ZLrhLKEdfN%2F-Ls2RxrdHy8RsiOcoorh%2Fimage.png?alt=media\&token=f12d1f8f-d7a1-4cc7-af26-316b5c59b7d8)

And even bigger 2705311284433920 bytes:

![](https://3496302873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LamHUpIpVXoBUUDZZpO%2F-Ls2QRSLa3ZLrhLKEdfN%2F-Ls2S4UeqSHCU3D3bf1V%2Fimage.png?alt=media\&token=57176e41-494c-4d50-a954-9ab2eda01129)

![](https://3496302873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LamHUpIpVXoBUUDZZpO%2F-Ls2QRSLa3ZLrhLKEdfN%2F-Ls2SFEoA4pr_awqQqM3%2Fimage.png?alt=media\&token=d73eb446-4d10-4f46-8b80-207b61cc47df)
