To size the undo tablespace I query v$UNDOSTAT
SELECT BEGIN_TIME, END_TIME, UNDOBLKS, MAXQUERYLEN from v$UNDOSTAT;
BEGIN_TIME END_TIME UNDOBLKS MAXQUERYLEN
------------------- ------------------- ---------- -----------
14.10.2016 10:38:57 14.10.2016 10:48:13 911 244
14.10.2016 10:28:57 14.10.2016 10:38:57 977 1120
14.10.2016 10:18:57 14.10.2016 10:28:57 1031 2266
14.10.2016 10:08:57 14.10.2016 10:18:57 1018 2365 <--
To find out the blocksize of the undo tablespace, I query
SELECT TO_NUMBER(value) DB_BLOCK_SIZE FROM v$parameter WHERE name = 'db_block_size';
DB_BLOCK_SIZE
-------------
8192
Now I can calculate the undo tablespace size. I have to divide the UNDOBLKS by 600 to get the rate of undo generation in blocks per second, and multiply by the blocksize to get the figure in bytes. Multiply by the largest figure for MAXQUERYLEN to find the space needed if the highest rate of undo generates coincided with the longest query and then divide by a billion to get the answer in gigabytes
1018/600 * 8192*2365=328713557,33
328713557,33/1000000000=0.3287GB
Is this a correct calculation? Should I consider other metrics to calcualte the size of the undo tablepsace?
Best Answer
You may use the calculation mentioned in this site:
https://taliphakanozturken.wordpress.com/tag/actual-undo-size/