MySQL database size-related issues

Source: Internet
Author: User
Tags time and date

consider this issue in two ways:
>> First is the single file size that the operating system uses to support the file system, such as:
Linux 2.2-intel 32-bit (ext2 file system) maximum support 2GB
Linux 2.4+ (ext3 file system) support 4TB
Win32 (FAT32 file system) 4GB
Win32 (NTFS file system) 2TB
>> Second is the maximum amount of space that the storage engine can support. Like
The InnoDB storage engine has a maximum tablespace size of 64TB, which does not specifically limit a single table, but is limited to table space.
MyISAM
The maximum table size is 65536TB, but before the MySQL5.0 version, by default, the maximum size allowed for a MyISAM single table is 4GB, and you can use SHOW
the maximum size of the table STATUS statement or MYISAMCHK-DV tbl_name checklist, if 4G, can be modified by modifying
the value of the Avg_row_length and max_rows options to achieve the purpose. After the MySQL5.0 version, the default MyISAM table is limited to 256TB.
Ps.mysql does not limit the number of bars for a single table data

Timestamp: A unique binary number automatically generated in the database, independent of time and date, usually used as a mechanism for adding a version stamp to a table row. The storage size is 8 bytes.

Each database has a counter that is incremented when an INSERT or update operation is performed on a table that contains timestamp columns in the database. The counter is a database timestamp. This can track the relative time within the database, not the actual time associated with the clock. A table can have only one timestamp column. The incremental database timestamp value is inserted in the timestamp column each time the row that contains the timestamp column is modified or inserted. This property makes the timestamp column unsuitable for use as a key, especially if it is not used as a primary key. Any update to the row changes the timestamp value, thereby changing the key value. If the column belongs to a primary key, the old key value will be invalid, and the foreign key referencing the old value will no longer be valid. If the table is referenced in a dynamic cursor, all updates change the position of the row in the cursor. If the column belongs to an index key, all updates to the data row will also cause the index to update.

Using the timestamp column in a row makes it easy to determine whether any value in the row has changed since the last time it was read. If a change is made to the row, the timestamp value is updated. If no changes are made to the row, the timestamp value is consistent with the timestamp value of the row that was previously read. To return the current timestamp value for the database, use @ @DBTS.

Play a role in controlling concurrency: A User A/b opens a record at the same time to start editing, save is able to determine the timestamp, because each time the record is updated, the system will automatically maintain the timestamp, so if you save the time stamp and the time stamp in the database if not equal, Note that the record has been updated during this process, so that you can prevent others from being overwritten by the update.



SQL Server 2005,
Maximum number of databases per instance 32767
Each database can store a maximum of 2 billion tables, each of which can have 1024 columns. The number of rows and total size of the table is limited only by the available storage space. You can store up to 8,060 bytes per line. If you create a table with a varchar, nvarchar, or varbinary column, and the total number of bytes in the column exceeds 8,060 bytes, you can still create this table, but a warning message appears. If you attempt to insert a row that is more than 8,060 bytes or update the row to a total of more than 8,060 bytes, an error message appears and the statement execution fails.


MySQL database size-related issues

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.