How to Display HIGH_VALUE/LOW_VALUE Columns from USER_TAB_COL_STATISTICS

October 16, 2007
By

Here is some code to display the HIGH_VALUE/LOW_VALUE columns from USER_TAB_COL_STATISTICS which are stored as RAW datatypes.

COLUMN_NAME          LOW_VAL          HIGH_VAL         DATA_TYPE
-------------------- ---------------- ---------------- ---------
ORGANIZATION_ID      00D000000000062  00D300000000tgk  CHAR
UG_ID                00500000000008U  00GD0000000mBda  CHAR
USERS_ID             005000000000063  00G30000000mBcq  CHAR
IS_TRANSITIVE        0                1                CHAR
SUPPRESS_RULES       0                1                CHAR

8 Responses to How to Display HIGH_VALUE/LOW_VALUE Columns from USER_TAB_COL_STATISTICS

  1. Brandon Allen on October 17, 2007 at 10:31 am

    This is exactly what I was looking for.

    Thanks!

  2. [...] can use following function to check the high and low values ( Thanks to Greg Rahn’s article [...]

  3. haykel on December 5, 2009 at 9:52 am

    Thank you for this Function , it helped me well

    rgrds

  4. Bruno Areal on October 25, 2010 at 7:57 am

    Exactly what i was looking for! Many many thanks! :)

  5. [...] column for peeked binds from v$sql_plan table . Downside of build_bind_vars is that it uses display_raw function of Greg Rahn which means creating a function in the DB because this function is not there by [...]

  6. [...] by level <= 1000000; commit; exec dbms_stats.gather_table_stats(user,'foo'); And using the display_raw function well look at the column stats. col low_val for a8 col high_val for a8 col data_type for a9 col [...]

  7. zhwsh on February 14, 2012 at 7:32 pm

    >elsif (type = ‘ROWID’) then
    > dbms_stats.convert_raw_value(rawval, cr);
    > return to_char(cnv);
    modify :

    elsif (type = ‘ROWID’) then
    dbms_stats.convert_raw_value(rawval, cr);
    return to_char(cr);

    • Greg Rahn on February 14, 2012 at 9:29 pm

      Thanks. I’ve changed the return variable from “cnv” to “cr”.

Leave a Reply

Your email address will not be published. Required fields are marked *

*