MySQL Meta database information_schema learning Tables Table

Source: Internet
Author: User

Tables in the INFORMATION_SCHEMA database are simply read-only, cannot be updated, deleted, and inserted, and cannot be triggered because they are actually just a view, not a base table, and there are no associated files.




There is a table tables in the INFORMATION_SCHEMA database, which provides a meta-information record of the database tables.




Here are a few of the frequently used field records:


Table_schema: The database name of the table in the record table_name: The table name in the record

Engine: the storage engine used by the table in the record table_rows: A rough row estimate of the table in the record

data_length: the size of the table in the record (in bytes) index_length: The index size of the table in the record



Knowing the above fields, you can query the size of the tables in the database, such as:

Select Table_schema,engine,table_name,table_rows,concat (data_length/1024/1024, ' MB '), concat (index_length/1024/ 1024x768, ' MB ') from Information_schema.tables ORDER BY data_length Desc


MySQL Meta database information_schema learning Tables Table

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.