简体   繁体   中英

Is there any way to find unique count of values in a column in mysql from stat like table_rows in information_schema.tables?

I want to find the approximate unique count of values in a column of table in mysql.

select count( Distinct col1) from table1;

Need replacement of above query with approximate value. count(Distinct Col1) takes too much time and i just want the approx value like table_rows in information_schema.tables

您可以按如下方式使用“近似”: select approximate count(distinct col1) from tableselect approximate count(distinct col1) from table

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM