Archive for the ‘performance & tuning’ Category

table highwatermark

Tuesday, August 18th, 2009

In principle it is simple : the query calcuate for each table how many blocks do I need for storing the data and how many blocks are allocated.
Be aware the statistics on the tables are recent.

  • SQL Table Highwatermark candidates
  • When cppy past this SQL the statement can give an error ORA-00911 due to a wrong ‘ sign. In this case plase replace the ’sign by a valid one.
    Tables with CLOB and LONG field are not covered.

    When you have the tables apply the resolution to repair the HWMS.

    Resolution :
    – alter table TALE_NAME move ;
    – alter index INDEX_NAME rebuild ; ( rebuild invalid indexes after table move)

    resources cost per table

    Monday, August 17th, 2009

    In most of he databases that suffer a poor performance ,the issue is often caused by the slowness of a single table. A table that lacks indexes or statistics can be responsible for 90% of the total physical or logical reads.
    In the past it was hard to determine that table. From version 9 Oracle created the view sys.segment_stats. This is a very powerfull view that shows the used resources per segment.
    Below an enhanced SQL based on v$segment_statistics to determine the segment reads compared with the total reads in the database.

  • SQL v$segment_statistics candidates
  • When a single segment takes more as 20% of the total reads that segment is a candidate for further tuning. Further tuning can be adding or modifying an index, evaluate the statistics or check the table highwater mark size.

    This way of working has proven to be very successfull.
    Also databases that do not have a known performance issue can benefit from this method. At the end of the day more tuned databases can run on 1 server, important for reducing the costs.
    Only if the performance remains poor after looking at v$segment_statistics more sophisticated ways of tuning have to be followed

    Copyright © 2007 Primos. All rights reserved.