"Database" sub-Library sub-table

Source: Internet
Author: User

"Database" sub-Library sub-table

I. Horizontal sub-table: when there is too much data in a table, you can consider the horizontal table.

A horizontal table is usually divided by a field in the table, such as by time, the data of each month is placed in a table, the name plus time to identify

Horizontal sub-table for the single-table data, and query the best single-table query, such as by time, the time span of the query is best in one months, if the span is larger than the number of tables, the more the table of the more performance is worse, it will not show the value of the table

Two. Vertical Sub-table: when there are too many fields in a table, you can consider the vertical table.

Vertical sub-tables can be used in a table of common fields, infrequently used fields in another table, the association between the multiple tables can be done with a GUID, of course, to hit the index

Three. Sub-Library: Split a database with many tables into several small databases

Generally can be closely related to a few tables in a database for easy query, such as the statistics can be placed in a database, log in a database

The benefit of the library is the ability to deploy databases on multiple hard disk servers, sharing database pressure

Four. The above several processes are optimized for big data, if the small system is not recommended, after all, increase the design and maintenance costs

"Database" sub-Library sub-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.