GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.voltdb.com — APPROX_COUNT_DISTINCT() Using VoltDBAPPROX_COUNT_DISTINCT()APPROX_COUNT_DISTINCT() — Returns an approximate count of the number of distinct values for the specified column expression. SynopsisAPPROX_COUNT_DISTINCT( column-expression ) DescriptionThe APPROX_COUNT_DISTINCT() function returns an approximation of the number of distinct values for the specified
column expression. APPROX_COUNT_DISTINCT(column-expression) is an alternative to the SQL
expression " The reason for using APPROX_COUNT_DISTINCT() is because it can be significantly faster and use less temporary memory than performing a precise COUNT DISTINCT operation. This is particularly true when calculating a distinct count of a partitioned table across all of the partitions. The approximation usually falls within ±1% of the actual count. You can use the APPROX_COUNT_DISTINCT() function on column expressions of decimal, date, timestamp, or any size integer datatype. You cannot use the function on floating point (FLOAT) or variable length (VARCHAR and VARBINARY) columns. ExampleThe following example returns an approximation of the number of distinct products available in each store. SELECT store, APPROX_COUNT_DISTINCT(product_id) FROM catalog
GROUP BY store ORDER BY store; |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |