MySQL Forums
Forum List  »  Memory Storage Engine

Re: Heap Table: How to define
Posted by: Ingo Strüwing
Date: March 29, 2006 07:46AM

Hi,

you can convert your table into a MEMORY (formely called HEAP) table with

ALTER TABLE forum_useronline ENGINE=MEMORY;

You could have created it as a MEMORY table from the beginning by using ENGINE=MEMORY instead of TYPE=MyISAM in the CREATE TABLE statement.

After every server start, memory tables are empty.

Your memory table will have a maximum size of 16MB by default.
You can change the default with SET GLOBAL max_heap_table_size=value; (before ALTER/CREATE, this requires SUPER privilege) or set the maximum size of an individual table with

ALTER/CREATE TABLE ... AVG_ROW_LENGTH=value MAX_ROWS=value;
You can combine this with the ENGINE=MEMORY table option.

Read more about MEMORY tables in http://dev.mysql.com/doc/refman/4.1/en/memory-storage-engine.html

Regards

Ingo Strüwing, Senior Software Developer - Storage Engines
MySQL AB, www.mysql.com

Options: ReplyQuote


Subject
Views
Written By
Posted
10600
March 29, 2006 03:42AM
Re: Heap Table: How to define
5346
March 29, 2006 07:46AM
4208
March 30, 2006 01:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.