Oracle Approximate Count Distinct Function
CREATE TABLE tab_num_list
(
col1 NUMBER
);
INSERT INTO tab_num_list
SELECT LEVEL
FROM dual
CONNECT BY LEVEL <= 100000;
SELECT Count(*),
Count(DISTINCT col1),
Approx_count_distinct(col1)
FROM tab_num_list;
No comments:
Post a Comment