Re: The wonder of increasing rows

  • From: Mladen Gogala <gogala.mladen@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Mon, 28 Oct 2019 08:08:04 -0400

Hi Lothar!

If you check DBA_INDEXES view, you will see DISTINCT_KEYS and NUM_ROWS columns. NUM_ROWS is cardinality. Note that if the underlying columns are not defined as NOT NULL,  the index cardinality doesn't necessarily match the table cardinality. DBA_TABLES also has NUM_ROWS column.

Regards

On 10/28/19 7:17 AM, l.flatz@xxxxxxxxxx wrote:

Hi Saysan,

what kind of Index statistics would be used to calculate cardinaliy?

Regards

Lothar

    ----Ursprüngliche Nachricht----
    Von : xt.and.r@xxxxxxxxx
    Datum : 28/10/2019 - 12:04 (MN)
    An : l.flatz@xxxxxxxxxx
    Cc : oracle-l@xxxxxxxxxxxxx
    Betreff : Re: The wonder of increasing rows

    Hi Lothar,

    For index access row-sources (rows 3-4 of the first plan) CBO
    calculates cardinality using index statistics, and for table
    access it uses table statistics.

-- Best regards,
    Sayan Malakshinov
    Oracle performance tuning engineer
    Oracle ACE Associate
    http://orasql.org


--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217

Other related posts: