1. Deduplicate the number of rows in the statistics table:
select count(distinct col_name) from table_name;
2. Count the number of rows
select count(*) from table_name;
3. You can use the mysql database INFORMATION_SCHEMA to query various information about the database or data table
4. There is also a default database PERFORMANCE_SCHEMA, which is mainly used to collect database server performance parameters
The database INFORMATION_SCHEMA provides a way to access database metadata. Metadata is data about the data, such as database name or table name, column data type, or access rights, etc.
refer to:
1、https://blog.csdn.net/XavierDarkness/article/details/77196714