Deterministic and Non -deterministics
Deterministic and Non-deterministic
Two approximate algorithms are offered for the approximate percentile functions:
- Non-deterministic: fastest method, whenever reproducibility is not required. This is the default method.
- Deterministic: slightly slower, but delivers deterministic results.
Note that the differences will not be apparent with the small dataset in use here.
REM Approximate median, NON DETERMINISTIC
select approx_median(volume), approx_median(volume,'ERROR_RATE')
from approxt where state = 'CA';
REM Approximate median, DETERMINISTIC
select approx_median(volume deterministic), approx_median(volume deterministic,'ERROR_RATE')
from approxt
where state = 'CA';
REM Approximate percentile, DETERMINISTIC
select approx_percentile(0.1 deterministic) within group (order by volume)
from approxt where state = 'CA';
Comments
Post a Comment