Size your Undo tablespace

Size your Undo tablespace


Here is the step by step approach:


Step 1: Longest running query.


SQL> select max(maxquerylen) from v$undostat;



MAX(MAXQUERYLEN)

----------------

1793


This gives you ideal value for UNDO_RETENTION. To be on the safer size you should add few more seconds to get the right value. So in my case, the size of undo retention should be say 2000 secs.



Step 2: Size of UNDO tablespace.


Size of UNDO needed = UNDO_RETENTIONx[UNDO block Generation per sec x DB_BLOCK_SIZE] + Overhead(30xDB_BLOCK_SIZE)


Out of these we know UNDO_RETENTION and DB_BLOCK_SIZE


All we need is to find out “UNDO Blocks per second”


Which can be easily fetched from v$undostat


SQL> SELECT (SUM(undoblks))/ SUM ((end_time - begin_time) * 24*60*60) "UPS"

2 FROM v$undostat;

UPS

------------------------------

8.11985583


V$undostat stores data for every 10 mins and begin/end times are start/end time of those intervals. We multiplied it with 24*60*60 because the difference between two dates will be in days and to get to seconds, we need it to multiply with 24hrs*60mins*60secs


So now we have all the values needed.


Undo size needed = [8.12 x 2000 x 8192] + [30 x 8192] = 133283840 bytes = 127.11 MB

要查看或添加评论,请登录

Ankit Aggarwal的更多文章

  • How to check RAC database status

    How to check RAC database status

    simply answer is Oracle provides the crs and srvctl command utility for checking on the external status of RAC…

  • Difference between the Checkpoint and SCN

    Difference between the Checkpoint and SCN

    Checkpoint ?Checkpoint in database is used to reduce the amount of the time for recovery. It is a background process in…

  • The difference between Cloning and Refreshing

    The difference between Cloning and Refreshing

    The difference between Cloning and Refreshing is that cloning process includes Oracle Home + database Clone; where as…

  • Oracle Histograms

    Oracle Histograms

    Gather stats for column level is called histogram. A histogram is a special type of column statistic that provides more…

    1 条评论
  • Oracle Memory Structure INSIDEs

    Oracle Memory Structure INSIDEs

    ***This is my pick-up for oracle memory. thanks in advance pls share your tips on Oracle Memory Structure insides*** 1.

  • Interview inception @lockdown4 India:

    Interview inception @lockdown4 India:

    - Don't illustrate something nearby, higher up concept to sound like an expert or related to the question Simply say I…

  • Lockdown .0 INDIA & logswitch per hour...cheers

    Lockdown .0 INDIA & logswitch per hour...cheers

    5 log switches per hour (maximum) & 3 Log switches per hour (ideal),recommended by oracle In a production environment…

  • Lockdown 3.0 India & Is it possible to use OLR without OCR in RAC?

    Lockdown 3.0 India & Is it possible to use OLR without OCR in RAC?

    Answer is No, interesting and thought provoking This is introduced in Oracle 11gR2 which will have all the resource…

  • Lockdown in INDIA & unlocking Oracle OCR & OLR meanwhile

    Lockdown in INDIA & unlocking Oracle OCR & OLR meanwhile

    ORACLE LOCAL REGISTRY(OLR) contains node-specific information required by OHASD . Every node has its own dedicated OLR…

  • introduction : compression in oracle

    introduction : compression in oracle

    Apart from reduced space consumption, the compressed data takes less time to go across the network, uses less space for…

社区洞察

其他会员也浏览了