Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Understanding Dynamic Sampling

RE: Understanding Dynamic Sampling

From: Christian Antognini <Christian.Antognini_at_trivadis.com>
Date: Fri, 22 Jun 2007 09:21:17 +0200
Message-ID: <F2C9CCA71510B442AF71446CAE8AEBAFBBD5C8@MSXVS04.trivadis.com>


Hi Ray

> I understand how dynamic sampling would assist in the
> scenario described in Level 4, but can someone help me
> understand "all tables for which standard selectivity
> estimation used a guess for some predicate that is a
> potential dynamic sampling predicate" ?

The following two queries provide an example.

SELECT *
FROM t
WHERE id = 19

SELECT *
FROM t
WHERE round(id) = 19

For the first one the query optimizer is able to estimate the selectivity of the predicate id=19 based on the column statistics. Thus no dynamic sampling is necessary. Instead for the second one without dynamic sampling the query optimizer should guess the selectivity of the predicate round(id)=19. In fact the column statistics only provide information about the column id itself, and not about its rounded values.

HTH
Chris

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jun 22 2007 - 02:21:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US