Re: partitions cardinality

  • From: Mauro Pagano <mauro.pagano@xxxxxxxxx>
  • To: "william@xxxxxxxxxxxxxxxxxxxx" <william@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sat, 18 Apr 2015 10:52:28 -0400

Also depending on the version you are on there might be some new fixes (ie
18182018, there is also another one I can't find) that change the way the card
is computed when scaling global stats down.

On Apr 18, 2015, at 10:20 AM, William Robertson
<william@xxxxxxxxxxxxxxxxxxxx> wrote:

That will depend.

Off the top of my head, if the partition can be determined from a
literal (so the query is explicitly about a specific partition) then
the partition stats will be used. If not, the optimiser will go to the
global stats for the num_rows of the table divided by the num_distinct
of the partition key column. There are doubtless a load more factors
involved though (dynamic sampling, index stats, whether you have bind
peeking disabled...) so you may need to be more specific.

William Robertson

On 18 Apr 2015, at 14:47, Ls Cheng <exriscer@xxxxxxxxx> wrote:

Hi

Does anyone know how cardinality is calculated in partitioned tables?

TIA
--
//www.freelists.org/webpage/oracle-l


Other related posts: