How To Analyze Stats Without Histograms

Today, a coworker ask me about how take stats on tables without histogram. The next sentence get analyze the table without statistics;

exec dbms_stats.gather_table_stats(user,tabname=>’MYTABLE’,method_opt=>’FOR ALL COLUMNS SIZE 1′,estimate_percent=>100,cascade=>TRUE);

You can take not histograms by columns, for this task please modify the clause method_opt, like the following example;

method_opt => ‘for columns <your_column> size 1’

In my opinion histograms are good in columns, specially where it is used for join. I think you have a good reason for not use them.





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s