Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Understanding Dynamic Sampling
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-lReceived on Fri Jun 22 2007 - 02:21:17 CDT
![]() |
![]() |