Forum Discussion
Conditional column taking more ram than expected
It depends on how much data you have. If you are at 24GB, you are going to start to have problems in the 25GB P1 capacity anyway as you need more memory to refresh.
If this is a large table, then doing it in M or further upstream will help but only because the engine will take this column into acount when it compresses the table. Calculated columns are compressed, but they are not taken into account when the compression algorithm is done, so they get compressed at however the rest of the table was done.
So converting from a CC to M is prefereable, but it will still take up space. Even from M, when taken into account, it might be highly compressed, but then will cause other columns to be sorted differently and they could grow. You'd have to test.
But there is no magic way to get what you want with no RAM consumption.