I am trying to make a growth prediction for some tables that I have, and for this I need to do some calculations based on my row sizes, the number of rows that I generate per day, and good. Mathematics.
I calculate the average size of each row in my table as the sum of the average size of each field. So basically:
SELECT 'COL1' , avg(vsize(COL1)) FROM TABLE union SELECT 'COL2' , avg(vsize(COL2)) FROM TABLE
Sum it up, multiply by the number of entries per day, and make predictions from there.
It turns out that for one of the tables I looked at, the resulting size is much smaller than I thought, and this made me wonder if my method was right.
In addition, I did not take into account the size of the indices for my forecasts - and, of course, I should.
My questions:
I did my search on Google, but the methods that I find relate to segments and extensions or calculations based on the whole table. I will need a step with the actual row of my table to make predictions (I need to analyze the data in the table to determine the number of records per day).
And finally, this is an approximation. I know that I am missing a few bytes here and there with overhead and stuff. I just want to make sure I'm missing bytes, not gigas :)
source share