RE: Histograms

From: TJ Kiernan <tkiernan_at_pti-nps.com>
Date: Thu, 27 Aug 2015 20:32:58 +0000
Message-ID: <196DB2D4BDE5804EAF3158CCC1C698BC8BF6F349_at_lopez.pti-nps.com>



This is a version-dependent question. My answers are for 11.2
  1. Histograms are enabled by default. Whether a histogram exists is determined by the amount of skew in a column and whether the column has been seen in a where clause.
  2. If there is sufficient skew and the field has been seen in a where clause, then it will be a frequency histogram if there are fewer than 255 distinct values and height balanced if there are 255 or more distinct values.

This changes some with version 12, and the specifics haven’t been relevant enough to me to have on standby, but the gist is that the accuracy for histograms where NDV >= 255 is improved vastly over height-balanced histograms.

HTH,
T. J.

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Michael Calisi Sent: Thursday, August 27, 2015 3:24 PM To: oracle-l_at_freelists.org
Subject: Histograms

I know how to check weather or not my tables are histogramed dba_tab_col_statistics, but my questions. 1. Do you need to set a parameter to enable histogram? 2. checking dba_tab_col_statistics the col histogram shows none, height balance-frequency. How is that determined?

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 27 2015 - 22:32:58 CEST

Original text of this message