Database Tuning (MOSC)

MOSC Banner

Is it important to have histogram on columns of small table ?

edited Sep 30, 2010 2:18AM in Database Tuning (MOSC) 5 commentsAnswered
Hi,
Yesterday , I was discussing a query performance issue with my fellow DBA, when he said that :
If a small table Small_table(10 rows) is part of complex query :
- we must have stats gathered on that column ( small_table.c1 ) otherwise CBO will not be able to understand the cardinality of predicate column of that small table and may produce wrong execution plan.
i.e
Select .....
From big_table1,
     big_table2,
     medium_table1,
     medium_table1,
     Small_table
where ......and small_table.c1 in ('A','B') ;
he says that histogram is must on small_table.c1 even if there are 2 rows satisfying the condition "small_table.c1 in ('A','B')"  in 10 row table.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center