View mysql Data Table Information

Source: Internet
Author: User

View the data table information. If you execute an SQL statement directly to the table, it may be slow when the table is large or other clients are operating on the table. For example, to view the number of records in the table, use: [SQL] SELECT COUNT (*) FROM tableName is very slow when updating a large table with other clients, it takes 3 or 4 minutes to return the result when you try to insert a table with 1 million rows and 20 clients. In fact, you can find the required data table information from the information_schema database of mysql. The database has a TABLES Table. Its main fields include: [SQL] TABLE_SCHEMA % database name TABLE_NAME % table name ENGINE % table ENGINE TABLES_ROWS % table record count DATA_LENGTH % data size INDEX_LENGTH % index size there are some other fields, for details, see the http://dev.mysql.com/doc/refman/5.1/zh/information-schema.html#tables-table on the official website to query this table to know the information of the data table. Author bhq2010

Related Article

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.