Mysql views the number of records in all tables

Source: Internet
Author: User


In mysql, you can view the number of records of all tables. in mysql, you can view the number of records of all tables: TABLE_SCHEMA: Database Name TABLE_NAME: Table Name ENGINE: Used storage ENGINE TABLES_ROWS: number of records DATA_LENGTH: the data size is measured in bytes, excluding 1024 as K and 1048576 (= 1024*1024) as M INDEX_LENGTH: Index size www.2cto.com use information_schema; select table_schema, table_name, table_rows from tables order by table_rows desc; view the specified database size: SELECT sum (DATA_LENGTH) + sum (INDEX_LENGTH) FROM information_schema.TABLES where TABLE_SCHEMA = 'database name '; the result is in bytes. Except 1024 for K, except 1048576 (= 1024*1024) for M.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.