RE: Question on Stats for Indexes Created in Parallel
Date: Tue, 1 Dec 2015 18:56:29 +0100 (CET)
Message-ID: <229412815.938019.1448992589205.JavaMail.open-xchange_at_app10.ox.hosteurope.de>
Hi Scott,
> DB Version 11.2.0.4 - NDV is wrong when index is built in parallel, correct when built serially. Stale_stats is set to NO (this is not what I saw in
> my earlier tests, maybe a user error.....)
I am pretty sure that the STALE_STATS effect is related to what i described previously (view definition). Just check the LAST_ANALYZED column of the table statistics. I assume that the statistics (for the table) were gathered in the default Oracle maintenance window.
Best Regards
Stefan Koehler
Freelance Oracle performance consultant and researcher
Homepage: http://www.soocs.de
Twitter: _at_OracleSK
> "Deas, Scott" <Scott.Deas_at_lfg.com> hat am 1. Dezember 2015 um 17:23 geschrieben:
>
>
> Hi Stefan,
>
> I guessed the same regarding the cause, but thought there may be something I'm missing.
>
> My concern about setting the stats is that for this low-cardinality column, I know what the distinct values are, but I would assume that any of our
> bitmap indexes will have bad cardinality estimates as a result of this issue (and I won't know the NDV for each). Re-gathering stats is not a
> deal-breaker, but it seems like it shouldn't have to be done.
>
> I ran a few more tests in our environments:
>
> DB Version 10.2.0.4 - NDV is correct, regardless of whether the index is built in parallel or not. Stale_stats is set to NO
> DB Version 11.2.0.4 - NDV is wrong when index is built in parallel, correct when built serially. Stale_stats is set to NO (this is not what I saw in
> my earlier tests, maybe a user error.....)
> DB Version 12.1.0.2.0 - NDV is wrong when index is built in parallel, correct when built serially. Stale_stats is set to NO
>
> Sounds like I need to open a ticket with Oracle.
>
> Thanks,
> Scott
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Dec 01 2015 - 18:56:29 CET