2010-09-24

Usefull indexes

Do we actually need such indexes?

select owner,table_name,index_name
from all_indexes
where distinct_keys < 2
and num_rows > 100;

1 comment:

  1. It all depends.

    for ex:
    Select whatever, to, do
    from workingtable
    where Status = 'WIP'

    Status columns may have only 1 value when stats_gather runs, but may have a few, and mostly skewed values during actual operations.

    dont rule out funny situations.

    ReplyDelete

About Me

My photo
I am Timo Raitalaakso. I have been working since 2001 at Solita Oy as a Senior Database Specialist. My main focus is on projects involving Oracle database. Oracle ACE alumni 2012-2018. In this Rafu on db blog I write some interesting issues that evolves from my interaction with databases. Mainly Oracle.