Mysql MEMORY Engine

Source: Internet
Author: User

1 CREATE TABLE' m ' (2`int`int(Ten) unsigned not NULLAuto_increment,3' Name 'varchar(Ten) not NULL,4' CTime 'int(Ten) not NULL,5' Ltime 'int(Ten) not NULL,6   PRIMARY KEY(`int`),7   UNIQUE KEY' name ' (' name '),8   KEY' Idx_ctime ' (' CTime ') USING BTREE,9   KEY' Idx_ltime ' (' ltime ') USING HASHTen) ENGINE=MEMORYDEFAULTCHARSET=Latin1

    • The MEMORY table engine supports btree/hash of two indexes, but text/bolb two types of fields are not supported.
    • The memory meter engine data is stored in RAM, and when the database restarts the data is lost, there is only one. frm file to hold the table structure. So the table structure is still there after the reboot.
    • The memory table maximum value is limited by the system variable Max_heap_table_size, the default is 16MB, to change the memory table size limit, you need to change the value of max_heap_table_size. You can also set the maximum number of rows for a table by using the Max_Rows option of the CREATE TABLE, but the max_heap_table_size takes precedence over max_rows, and when both exist for maximum compatibility, you need to Max_heap_table_ Size sets a reasonable value.

Mysql MEMORY Engine

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.