<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - Memory Storage Engine</title>
        <description>Forum for Memory Storage Engine.</description>
        <link>http://forums.mysql.com/list.php?92</link>
        <lastBuildDate>Sun, 26 May 2013 08:55:23 +0000</lastBuildDate>
        <generator>Phorum 5.2.19</generator>
        <item>
            <guid>http://forums.mysql.com/read.php?92,584720,584720#msg-584720</guid>
            <title>In-memory dB on Embedded system. (1 reply)</title>
            <link>http://forums.mysql.com/read.php?92,584720,584720#msg-584720</link>
            <description><![CDATA[ Hi,<br />
<br />
I am a newbie in database. Please excuse me If my query sounds elementary.<br />
<br />
I have an Embedded Debian linux 2.6.35.9, mysql 5.1.<br />
<br />
My objective is to run the db in-memory, as in the long run it would damage the flash drive with too many read/write operations.<br />
<br />
Hence I want to run the db in-memory and to have data consistency, I want to write back the data to<br />
1. flash drive say every 2hrs(or may be less).<br />
2. Also during every system restart/shutdown, copy the data to/from memory from/to flash drive.<br />
<br />
Please help me with some pointers. I believe there exists some solution, as I have time constraints, I could not do exhaustive research. Hence any help is much appreciated.<br />
<br />
<br />
Thanks<br />
Sandhya]]></description>
            <dc:creator>Sandhya Srinivas</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Thu, 25 Apr 2013 15:10:22 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,580505,580505#msg-580505</guid>
            <title>No Limits - Memory Engine (10 replies)</title>
            <link>http://forums.mysql.com/read.php?92,580505,580505#msg-580505</link>
            <description><![CDATA[ Hello,<br />
<br />
I have a setup that kind of mimic in-memory database. I have a table created as memory engine and the same server is configured to act as master and slave. The slave is another database which has the same table structure, but the engine is innodb. Now, we all know that the maximum limits of memory engine and that is restricted to max_heap_table_size. Now that, we have this limitation,I had to ahve some kind of work around. My application was a logger that continuously wrote to this table (no updates/deletes) and then the reporting module read it off the slave for graphs and analytical information.<br />
So I decided to partition the memory engine based table on the master by primary key (hash partition) and there after even after 4M records, i dont see table full! <br />
<br />
here is how it is done:-<br />
<br />
CREATE TABLE `callstack` (<br />
  `instance_id` bigint(20) NOT NULL AUTO_INCREMENT,<br />
  `t_thread_id` varchar(64) DEFAULT NULL,<br />
  `s_id` varchar(64) DEFAULT NULL,<br />
  `t_host` varchar(30) DEFAULT NULL,<br />
  `s_t_id` varchar(64) DEFAULT NULL,<br />
  `p_s_t_id` varchar(64) DEFAULT NULL,<br />
  `service` varchar(30) DEFAULT NULL,<br />
  `ipa` varchar(50) DEFAULT NULL,<br />
  `c_time` bigint(20) DEFAULT NULL,<br />
  `duration` smallint(6) DEFAULT NULL,<br />
  `s_host` varchar(30) DEFAULT NULL,<br />
  `event` varchar(15) DEFAULT NULL,<br />
  `mode` varchar(10) DEFAULT NULL,<br />
  PRIMARY KEY (`instance_id`)<br />
) ENGINE=MEMORY DEFAULT CHARSET=latin1<br />
/*!50100 PARTITION BY HASH (instance_id)<br />
PARTITIONS 100 */<br />
<br />
Current Table status:=<br />
=====================<br />
<br />
mysql&gt;  show table status like 'callstack%';<br />
+-----------+--------+---------+------------+---------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+<br />
| Name      | Engine | Version | Row_format | Rows    | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time | Check_time | Collation         | Checksum | Create_options | Comment |<br />
+-----------+--------+---------+------------+---------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+<br />
| callstack | MEMORY |      10 | Fixed      | 4370554 |            479 |  2095729600 |               0 |     90993600 |         0 |        4370555 | 2013-02-28 10:20:41 | NULL        | NULL       | latin1_swedish_ci |     NULL | partitioned    |         |<br />
+-----------+--------+---------+------------+---------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+---------+<br />
1 row in set (0.00 sec)<br />
<br />
max_heap_table_size variable<br />
============================<br />
<br />
mysql&gt; show variables like '%heap%';<br />
+---------------------+-----------+<br />
| Variable_name       | Value     |<br />
+---------------------+-----------+<br />
| max_heap_table_size | 268435456 |<br />
+---------------------+-----------+<br />
1 row in set (0.00 sec)<br />
<br />
<br />
Is the memory engine broken or is this a edge case issue? But nonetheless, it is working for me as I wanted!<br />
<br />
Regards,<br />
Raghu]]></description>
            <dc:creator>Raghunandan Sastry</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Thu, 21 Mar 2013 01:19:08 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,577362,577362#msg-577362</guid>
            <title>Index for group by not working (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,577362,577362#msg-577362</link>
            <description><![CDATA[ Adding indexes for group by optimization doesn't seem to work for heap tables. In the example below I create two tables - a standard MyISAM and a MEMORY one. The MyISAM table can group by far faster than the heap table, even though they're identical and both have BTREE index. Is it intentional that heap tables shouldn't use indexes for group by?<br />
<br />
<hr class="bbcode"/>
<pre class="bbcode">-- Setting everything up

SET max_heap_table_size = 104857600;

CREATE TABLE lookup_mem
    (id INT, INDEX USING BTREE (id))
    ENGINE = MEMORY;

CREATE TABLE lookup_hdd
    (id INT, INDEX USING BTREE (id))
    ENGINE = MYISAM;


DELIMITER $$

CREATE PROCEDURE `populate_table`()
BEGIN
    DECLARE count INT DEFAULT 0;
    WHILE count &lt; 3000000 DO
        INSERT INTO lookup_mem SET id = ROUND(RAND()*100);
        SET count = count + 1;
    END WHILE;
END$$

DELIMITER ;



CALL populate_table;

INSERT INTO lookup_hdd SELECT * FROM lookup_mem;</pre>
<br />
<hr class="bbcode"/>
<br />
Now to the fun stuff:<br />
<br />
<br />
<hr class="bbcode"/>
<br />
<pre class="bbcode">EXPLAIN SELECT * FROM lookup_mem GROUP BY id;

-- gives
-- 1, SIMPLE, lookup_mem, index, , id, 5, , 3000000, 

EXPLAIN SELECT * FROM lookup_hdd GROUP BY id;

-- gives
-- 1, SIMPLE, lookup_hdd, range, , id, 5, , 101, Using index for group-by





SELECT * FROM lookup_mem GROUP BY id;

-- takes 1.216 seconds

SELECT * FROM lookup_hdd GROUP BY id;

-- takes 0.001 seconds</pre>
<br />
<hr class="bbcode"/>
<br />
<br />
I'm using mysql 5.5.29. I've also tried this on 5.1 with the same results.]]></description>
            <dc:creator>Andy Svensson</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Tue, 15 Jan 2013 08:20:57 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,574874,574874#msg-574874</guid>
            <title>Use more CPU and Ram (1 reply)</title>
            <link>http://forums.mysql.com/read.php?92,574874,574874#msg-574874</link>
            <description><![CDATA[ Hi,<br />
<br />
Fist of all i'd like to know if I am using 32bit mysql or 64bit when the result to SHOW GLOBAL VARIABLES LIKE 'version_compile_machine'; query is x86. NOT x86_64! show variables like 'version_compile_machine'; gives the same result.<br />
<br />
Secondly I'd like to improve the performance of mysql when adding and retrieving data, I've notice that only 30% cpu and 1-2% Ram are used. I am using InnoDb default storage engine (if that helps).<br />
<br />
Thank you.]]></description>
            <dc:creator>PF SQL</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Mon, 03 Dec 2012 01:46:54 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,573430,573430#msg-573430</guid>
            <title>Error 126 Incorrect key file for table (1 reply)</title>
            <link>http://forums.mysql.com/read.php?92,573430,573430#msg-573430</link>
            <description><![CDATA[ Hi ,<br />
<br />
I am getting error 126 while trying to join 2 tables.<br />
Is there any way to update tempdir path.<br />
I have this issue in Windows7 OS ans mysql5.5. I found one solution on net that using --tmpdir will change the tmp file path but when i tried mysql is not recognizing this option. <br />
<br />
Any help?]]></description>
            <dc:creator>ss ss</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Sun, 11 Nov 2012 16:42:44 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,573215,573215#msg-573215</guid>
            <title>Apparently enough max_heap_table_size but &quot;table is full&quot; (3 replies)</title>
            <link>http://forums.mysql.com/read.php?92,573215,573215#msg-573215</link>
            <description><![CDATA[ I am trying to load 2x10e9 data into a table created by memory storage engine.<br />
But mysql server claims &quot;table is full error&quot;. It will be great if some body could comment on how to avoid this.<br />
<br />
Estimated memory required to store the data and the index is around 500GB, <br />
according to the manual: <br />
<a href="https://dev.mysql.com/doc/refman/5.5/en/memory-storage-engine.html"  rel="nofollow">https://dev.mysql.com/doc/refman/5.5/en/memory-storage-engine.html</a><br />
<br />
&gt; SUM_OVER_ALL_BTREE_KEYS(max_length_of_key + sizeof(char*) * 4)<br />
&gt; + SUM_OVER_ALL_HASH_KEYS(sizeof(char*) * 2)<br />
&gt; + ALIGN(length_of_row+1, sizeof(char*))<br />
<br />
So, I allocated around 1.5TB memory to the max_heap_table_size so that the <br />
mysql is allowed to use the required memory size. <br />
<br />
But the &quot;table is full error&quot; persists. <br />
<br />
If I remove the ddl for creating index, the data load it self finished without <br />
any error. But after the data loading when I try to make btree index, the <br />
error &quot;table is full&quot; happens again. <br />
<br />
Hash index seems to be all right to create. Could somebody give me some advise <br />
on what I should do to create btree index on memory engine table with 2x10e9 size? <br />
<br />
This is the ddl for the table. <br />
<br />
##############################################<br />
<br />
create table table_a (<br />
  col1 int,<br />
  col2 int,<br />
  col3 float,<br />
  col4 float,<br />
  col5 varchar16<br />
) ENGINE = Memory;<br />
<br />
create index idx1 on table_a ( col1 ) using btree;<br />
create index idx2 on table_a ( col2 ) using btree;<br />
<br />
<br />
##############################################<br />
<br />
my.cnf<br />
<br />
##############################################<br />
<br />
max_heap_table_size = 1024*1024*1024*500*3<br />
<br />
##############################################<br />
<br />
<br />
System:<br />
<br />
Red hat linux 6.2, 64bit<br />
MySQL 5.5.21<br />
Physical memory 2.0TB]]></description>
            <dc:creator>Ken Kakihara</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Sun, 18 Nov 2012 04:37:04 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,568079,568079#msg-568079</guid>
            <title>the table is full error using Memory Engine (4 replies)</title>
            <link>http://forums.mysql.com/read.php?92,568079,568079#msg-568079</link>
            <description><![CDATA[ Hello,<br />
<br />
I am creating and inserting records in a temporary table in a function that runs numerous times. My question is that if I continuously drop and then create table with new records which do not exceed max_table_heap_size, does it free MySQL heap?<br />
<br />
I am facing &quot;the table is full&quot; error but maximum no. of records inserted do not exceed 10000.]]></description>
            <dc:creator>Adnan Raza</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Thu, 13 Sep 2012 02:25:55 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,568073,568073#msg-568073</guid>
            <title>Table is full error problem (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,568073,568073#msg-568073</link>
            <description><![CDATA[ Hello,<br />
<br />
I have created and inserted records in a temporary table which has its engine=MEMORY, now the problem is that whenever records go up to 37000, it gives out an error, table is full.<br />
<br />
the temp table has only three fields and not much data and the max_heap_table_size = 16777216 which is 16 MB.<br />
<br />
I really can't understand why is 16 MB becoming insufficient...]]></description>
            <dc:creator>Adnan Raza</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Mon, 10 Sep 2012 10:37:43 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,565771,565771#msg-565771</guid>
            <title>IMDB data processing (1 reply)</title>
            <link>http://forums.mysql.com/read.php?92,565771,565771#msg-565771</link>
            <description><![CDATA[ Hi all,<br />
<br />
<br />
I need a fast processing of a small amount of data (up to 300K lines in max.). <br />
I need to calculate durations between 2 entries in 2 different tables (1 is a filtered copy, which contains less data).<br />
<br />
the table structure is very simple:<br />
<br />
table a and table b looks like the following:<br />
{<br />
 key   varchar(50) &lt;-- which is a GUID<br />
 key2  varchar(50) &lt;-- which is a GUID<br />
 ts    datetime <br />
 event varchar(50)<br />
 duration int<br />
}<br />
<br />
<br />
table a contains 300K rows, table b contains values from table a where a special &quot;event&quot; is set (lets say only 200K rows).<br />
<br />
now I do the following to calculate the durations:<br />
<br />
for each line in table a lookup the next entry in table b where the key2 is the same but b.ts greater a.ts. with the result table a will be updated...<br />
<br />
To be honest nothing serious, on my win32 test-machine (shame on me) I installed mySQL and craeted the tables. For my test case I loaded the data from the file and created a small procedure to test the case.<br />
<br />
Fist of all: I aborted the test after 3 hours (MS SQL Server does it in 2) but I think it could be OS related since I think that windows stored the mysql process memory in the pagefile (that could be the cause why the hdd led was continously flashing)...<br />
<br />
Does anyone had realized the same ?<br />
Is it faster on linux os or are there configuration switches which can improve this ?<br />
<br />
If necessary I can provide the procedure and tables (and 40 MB compressed data), but for this case I think it is not necessary...<br />
<br />
Thanks for any idea / help !<br />
<br />
<br />
Kind regards<br />
<br />
Christian]]></description>
            <dc:creator>Christian Wallukat</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Fri, 24 Aug 2012 14:44:35 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,562636,562636#msg-562636</guid>
            <title>&quot;#1030 - Got error 28 from storage engine&quot; (1 reply)</title>
            <link>http://forums.mysql.com/read.php?92,562636,562636#msg-562636</link>
            <description><![CDATA[ I am getting this error when I try to see the SCTRUTURE of a table in my database:<br />
&quot;#1030 - Got error 28 from storage engine&quot;<br />
<br />
Also, the commands to clean and eliminate the table are not working. I tried to empty the TMP folder in server directory, but it did not work. Also tried to OPTIMIZE the table, in PHPMYADMIN, but also no results.<br />
<br />
thanks for any suggestions!]]></description>
            <dc:creator>Jorge Elias</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Fri, 27 Jul 2012 05:51:47 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,554136,554136#msg-554136</guid>
            <title>How to use memcached_functions_mysql at mysql layer (1 reply)</title>
            <link>http://forums.mysql.com/read.php?92,554136,554136#msg-554136</link>
            <description><![CDATA[ I have installed mysql server 5.5, memcached, libmemcache and<br />
memcached_functions_mysql.<br />
<br />
Now I want to use it on my slow queries like SELECT statement.<br />
<br />
Say I want to cache below query on mysql layer<br />
<br />
SELECT * FROM payements;<br />
<br />
How do i cache it on mysql layer.]]></description>
            <dc:creator>Supriya Mayekar</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Thu, 14 Jun 2012 04:24:18 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,519064,519064#msg-519064</guid>
            <title>table size growth (3 replies)</title>
            <link>http://forums.mysql.com/read.php?92,519064,519064#msg-519064</link>
            <description><![CDATA[ Hello all,<br />
<br />
I've been monitoring the size of our memory tables for a few weeks now (with Cacti actually). And I noticed that the table size isn't growing linearly but from time to time.. for example, I had a 700 MB table which increased by 500 MB suddenly.<br />
<br />
I think it may be logical since the engine is memory and its allocation cost a lot of CPU.. so MySQL probably allocates memory space by segment.<br />
<br />
So, I'd like to know two things. First, is my theory correct? and then, how can I tune this behavior?<br />
<br />
<br />
Thank you for your help.<br />
<br />
Ben]]></description>
            <dc:creator>Benjamin Tuffreau</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Sat, 10 Mar 2012 17:47:08 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,510484,510484#msg-510484</guid>
            <title>Mysql Memory table getting many locks (1 reply)</title>
            <link>http://forums.mysql.com/read.php?92,510484,510484#msg-510484</link>
            <description><![CDATA[ On my site I log every pageview (date, ip, referrer, page, etc) in a simple mysql table.<br />
<br />
This table gets 1 SELECT queriy per minute, 1 delete query per minute, no UPDATE queries, but a LOT of INSERTS. (about 300 per second).<br />
<br />
This table is never bigger than 200MB.<br />
<br />
Today I changed this table from an InnoDB table to a MEMORY table, this made sense to me to prevent unnecessary hard disk IO. I also prune this table once per minute, to make sure it never get's too big. And this information is not very important, so on restart of MySQL it does not matter that it is removed.<br />
<br />
--<br />
<br />
Performance wise, things are running fine. But I noticed that while running tuning-primer, that my **Current Lock Wait ratio** is quite high using MEMORY table.<br />
<br />
    Current Lock Wait ratio = 1 : 561<br />
<br />
If I change this table to InnoDB the ratio is:<br />
<br />
    Current Lock Wait ratio = 0 : 78600946<br />
<br />
My question: Should I worry about this Lock Wait Ratio? And is there something I can change in my configuration to improve things so that the lock wait ratio isn't so high using MEMORY tables?]]></description>
            <dc:creator>boon m</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Sun, 22 Jan 2012 01:48:26 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,490510,490510#msg-490510</guid>
            <title>Memory load extremely high (1 reply)</title>
            <link>http://forums.mysql.com/read.php?92,490510,490510#msg-490510</link>
            <description><![CDATA[ Hello,<br />
<br />
When I request SELECT * FROM dev_dwh.ods_ventes o on the table that contains 85 billion of rows, following message ‘The memory load of the system is extremely high. This is likely because of the current result being very large’  displays in about 1,5 billion of extracted rows.<br />
<br />
How to do to extract the 85 millions of rows? Is it possible? Should it parameter anything in MYSQL Server? Or perhaps in RAM memory windows server?<br />
<br />
Thank you very much for your help.<br />
<br />
Best regards,<br />
<br />
Christopher]]></description>
            <dc:creator>bastide christopge</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Sun, 30 Oct 2011 21:54:07 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,430437,430437#msg-430437</guid>
            <title>Memory + MAX_ROWS (hash rebuild) quick question (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,430437,430437#msg-430437</link>
            <description><![CDATA[ For reference, from <a href="http://dev.mysql.com/doc/refman/5.5/en/memory-storage-engine.html"  rel="nofollow">http://dev.mysql.com/doc/refman/5.5/en/memory-storage-engine.html</a>:<br />
<pre class="bbcode">
You can also specify a MAX_ROWS table option in CREATE TABLE statements for
MEMORY tables to provide a hint about the number of rows you plan to store in
 them. This does not enable the table to grow beyond the max_heap_table_size
 value, which still acts as a constraint on maximum table size. For maximum 
flexibility in being able to use MAX_ROWS, set max_heap_table_size at least as
 high as the value to which you want each MEMORY table to be able to grow.</pre>
<br />
I know Hashing (and Hash Indexes for the Memory engine) are complicated subjects, but if nothing else, hopefully the answer to this question will help me understand better:<br />
<br />
My current understanding (even as a software engineer) is that for most Hash implementations, (such as a Java HashMap), you must specify an upper-bound for the hash (to avoid the hash from having to be recalculated [rebuilt] every so often for inserts, to maintain O(1) lookup performance). Is that the purpose of MAX_ROWS in the Memory engine?<br />
<br />
Thanks,<br />
- John]]></description>
            <dc:creator>John Nahlen</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Fri, 12 Aug 2011 05:29:34 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,427111,427111#msg-427111</guid>
            <title>Unable to delete records or truncate temporary memory tables (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,427111,427111#msg-427111</link>
            <description><![CDATA[ hi<br />
i am trying to delete datas from a temporary table, but its failing.<br />
<br />
Please help me]]></description>
            <dc:creator>Meenakshi SUndara Santhosh</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Sat, 16 Jul 2011 10:49:57 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,426686,426686#msg-426686</guid>
            <title>memory engine opimization (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,426686,426686#msg-426686</link>
            <description><![CDATA[ sir<br />
<br />
i have 64 bit windows7 os with 64bit 5.1.48 version mysql.<br />
i have 72 lakes recored in the memory table with 280.8mb data length<br />
when i run the query it take 2 min to show the result. but i want it within 1 sec.<br />
<br />
if i have to change any thing in my.ini file ,than what details should i change <br />
so that it comes within 1 sec.<br />
<br />
<br />
can any one help me<br />
regards <br />
deva]]></description>
            <dc:creator>deva clementraj</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Wed, 13 Jul 2011 12:40:59 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,425906,425906#msg-425906</guid>
            <title>best practices for variable size limitation (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,425906,425906#msg-425906</link>
            <description><![CDATA[ hi guys,<br />
<br />
from the limitation presented for myslq RAM tables, what is best practice for storing large pieces of text or binary data?<br />
<br />
i found this project: <a href="http://code.google.com/p/mysql-heap-dynamic-rows/"  rel="nofollow">http://code.google.com/p/mysql-heap-dynamic-rows/</a><br />
but i'm not sure i want to maintain someone else's code for production...<br />
<br />
since a mem table has a default size of 16M, maybe it makes sense to strip text across multiple rows?<br />
<br />
how will or did you approach this limitation?<br />
<br />
thanks for your help.<br />
<br />
~nir.]]></description>
            <dc:creator>nir pengas</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Wed, 06 Jul 2011 20:40:37 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,425204,425204#msg-425204</guid>
            <title>MEMORY table seems very slow (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,425204,425204#msg-425204</link>
            <description><![CDATA[ Hi,<br />
<br />
I have a memory table specifically for doing some very quick lookups, it looks like this;<br />
<br />
CREATE TABLE  `mnocLookup` (<br />
  `mnocId` int(10) unsigned NOT NULL,<br />
  `cns` char(15) NOT NULL,<br />
  PRIMARY KEY (`mnocId`),<br />
  KEY `idx_cns` (`cns`) USING BTREE<br />
) ENGINE=MEMORY DEFAULT CHARSET=latin1;<br />
<br />
On my workstation (5.1.42 64b) i can query this very quickly. for example;<br />
<br />
<br />
mysql&gt; select benchmark(1000000, (<br />
    -&gt;   SELECT SQL_NO_CACHE COUNT(mnocId)<br />
    -&gt;   FROM mnocLookup<br />
    -&gt;   WHERE cns LIKE concat(SUBSTRING('1234567988798', 1, 7),'%'))<br />
    -&gt; ) as x;<br />
+---+<br />
| x |<br />
+---+<br />
| 0 |<br />
+---+<br />
1 row in set (0.02 sec)<br />
<br />
However on our production server (5.0.77 64b) the same benchmark takes 5-10 times longer.<br />
<br />
I've checked the configs and can't find anything out of whack, so i'm wondering if there were some big improvements in the Memory storage engine between 5.0 and 5.1?<br />
<br />
Cheers, Chris]]></description>
            <dc:creator>Chris Blackwell</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Thu, 30 Jun 2011 11:44:27 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,420903,420903#msg-420903</guid>
            <title>Speed of reading decreases in time (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,420903,420903#msg-420903</link>
            <description><![CDATA[ I have a procedure that simulates some objects and for each simulated object it does a lot of reading from two memory tables with 40-50 mln records in each.<br />
<br />
Number of reads from that tables for each simulated object is about 50.<br />
<br />
The issue is that when I start simulating some number of objects, simulation speed of first object is about 0.25 sec/object. But the speed decreases in time - after simulated 2,000 objects the speed is about 10 sec/object, after 5,000 objects - 70 sec/object.<br />
<br />
And the slowest queries are reads from these two memory tables.<br />
<br />
Memory limits should be okay:<br />
max_heap_table_size     = 20G<br />
tmp_table_size          = 2G<br />
<br />
P.S. I do only reads - no inserts or updates.]]></description>
            <dc:creator>Andrey Shchurkov</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Mon, 23 May 2011 10:58:39 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,418780,418780#msg-418780</guid>
            <title>Btree index now huge on new system (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,418780,418780#msg-418780</link>
            <description><![CDATA[ Where I work we do statistical analysis on large datasets on a server with tons of RAM so I frequently use memory tables. Our old system was a Dell R900 with 128 GB of RAM running Sles 10 and Mysql 5.0.  I had no problems with my 20GB memory tables and Btree indexes. We are upgrading to a Dell R910 server running sles 11 and 256 GB of ram on which I installed Mysql 5.5.  Running the exact same program on the exact same data my index length exploded (10,000x bigger) filling up my memory quite quickly.  I tried downgrading to mysql 5.0 and tested upgrading to 5.5 on the older machine and I get this exact same behavior with the huge btree index size.  Is there some sort of setting in my.cnf or on the operating system (or anything else) that would impact this index becoming exponentially bigger?  Any help would be appreciated, I have been trying to sort this out for a week and if I can't fix it our new equipment is going to end up being much slower if I have to convert to disk based tables.<br />
<br />
Thanks in advance.]]></description>
            <dc:creator>Jason Preuss</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Thu, 05 May 2011 12:21:55 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,410056,410056#msg-410056</guid>
            <title>Session in memory table (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,410056,410056#msg-410056</link>
            <description><![CDATA[ Hi everybody!<br />
Actually I store session data in a InnoDB table. I wonder if I could gain performance if I used a MEMORY table instead. I think that on one hand I could save a lot of disk I/O, but on the other hand, as InnoDB tables have row-level locks whilst MEMORY tables have table-level lock , probably updating/deleting operations would be slower.<br />
Is there anybody who has experienced saving session data in MEMORY tables? Any feedback about it? <br />
<br />
Thanks in advance.<br />
<br />
Stefano]]></description>
            <dc:creator>stefano dolzi</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Tue, 01 Mar 2011 19:23:45 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,405702,405702#msg-405702</guid>
            <title>Slow INSERTs to MEMORY table (1 reply)</title>
            <link>http://forums.mysql.com/read.php?92,405702,405702#msg-405702</link>
            <description><![CDATA[ Hi,<br />
<br />
I've a performance problem with &quot;INSERT INTO ... SELECT FROM&quot; statement. Internal SELECT statement is fast, it based on 10M rows table and returns results in 0.3 seconds.<br />
<br />
The problem begins when I try to insert returned results (notice, that it's only 12k records!) to another temporary tabel with MEMORY engine using &quot;INSERT INTO ... SELECT FROM&quot; statement. A time of whole statement is more than 5 seconds. I would add that I run on fast (16 core, 24GB RAM) dedicated server. Temporary table has no indexes, and it's empty.<br />
<br />
So, the question is why these INSERTs to MEMORY table are so slow? Maybe sb could help me to find a solution to improve timings of INSERTS.]]></description>
            <dc:creator>Ravo PL</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Sun, 24 Apr 2011 11:52:17 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,401582,401582#msg-401582</guid>
            <title>disable locking on memory/heap table (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,401582,401582#msg-401582</link>
            <description><![CDATA[ I am wondering if it is possible to disable (internal) locking for (a) memory table. i have the following script that does the following tasks in sequential order<br />
<br />
insert records into memory table with unique ID<br />
update records into memory table with unique ID<br />
<br />
I run like 40 instances of this script at the same time, <br />
<br />
script 1 has a uniqe of '1', all then actions (insert and update) are only on records with that ID<br />
<br />
script 2 has a uniqe of '2', all then actions (insert and update) are only on records with that ID<br />
<br />
so although there are multiple actions going on in the table they are never on the same records.<br />
<br />
So there is no reason at all to use locking because the same script instance never reads and updates the same records.<br />
<br />
I did not find it in the documentation but does anybody know if it is possible ?]]></description>
            <dc:creator>koos alberts</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Wed, 05 Jan 2011 12:40:53 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,393909,393909#msg-393909</guid>
            <title>What happened to the row level locking efforts? (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,393909,393909#msg-393909</link>
            <description><![CDATA[ Hi,<br />
<br />
maybe I missed something.<br />
<br />
There have been some efforts around 2008 to give the memory storage engine some row locking capabilites.<br />
There was this one on topcoder:<br />
<a href="http://forums.mysql.com/read.php?92,176206,223146#msg-223146"  rel="nofollow">http://forums.mysql.com/read.php?92,176206,223146#msg-223146</a><br />
and apparently also some kind of competition:<br />
<a href="http://forums.mysql.com/read.php?92,176206,225730#msg-225730"  rel="nofollow">http://forums.mysql.com/read.php?92,176206,225730#msg-225730</a><br />
but I could not find any results from these.<br />
<br />
Yes I saw the hints to replace Memory Engine with MySQL Cluster. But this heavyweight thing requires installing three nodes on one server and then has capabilities that never will be needed for the volatile data Memory engine was made for, but surely have impact on performance.<br />
<br />
Now can anybody tell what happened to the row lock topics?]]></description>
            <dc:creator>Joachim Welters</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Tue, 09 Nov 2010 21:48:32 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,393012,393012#msg-393012</guid>
            <title>memory engine not release memory in linux (1 reply)</title>
            <link>http://forums.mysql.com/read.php?92,393012,393012#msg-393012</link>
            <description><![CDATA[ 1. mysql version 5.5<br />
2. linux 2.6.18-92.el5<br />
<br />
I have create 300 tables engine is heap, the size of each table is about 5MB.<br />
And I use 'ps aux|grep mysqld' and mysqld have used about 1.8GB mem, <br />
When I drop these 300 tables, and use 'ps axu|grep mysql' again, mysqld also have used about 1.8GB mem.<br />
why? Thanks<br />
<br />
best <br />
wishes<br />
<br />
zhangmaosen]]></description>
            <dc:creator>zhang maosen</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Sat, 04 Dec 2010 21:43:20 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,386882,386882#msg-386882</guid>
            <title>High volume insert/select/delete (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,386882,386882#msg-386882</link>
            <description><![CDATA[ I have an operational logic as follows<br />
<br />
TEMP_TABLE_USER --&gt; UID UNSIGNED INT [single column, fixed size table, max rows=5k]<br />
<br />
int i=total_size=minVal=0;<br />
int maxVal=integer-max-val;<br />
while(i&lt;n&amp;&amp;total_size&lt;=100) {<br />
<br />
1. Bulk Insert into TEMP_TABLE_USER k rows {k&lt;=5000}<br />
2. select UID from TEMP_TABLE_USER m1 INNER JOIN BASE_TABLE_USER m2 WHERE<br />
   m1.UID=m2.UID AND UID&gt;minVal AND UID&lt;=maxVal AND some extra where <br />
   conditions on BASE_TABLE_USER<br />
   LIMIT 100;<br />
   [BASE_TABLE_USER has UID as PRIMARY KEY, m rows {m&lt;=100,000}, MyISAM table]<br />
3. total_size+=sizeof select from Step 2 [check if 100 matches are found]<br />
4. minVal=MIN(UID) from Step 2; maxVal=MAX(UID) from Step 2.<br />
5. DELETE FROM TEMP_TABLE_USER WHERE UID NOT IN (uids obtained in step2)<br />
   AND UID&gt;=MIN_UID AND UID&lt;=MAX_UID [Delete rows to compact temp table]<br />
6. i++<br />
}<br />
<br />
Whenever 100 matches are found, the program exits.<br />
<br />
Considering worst case of n=50 for obtaining 100 matches. It implies around 250,000[50*5k] rows will be inserted/selected/deleted continuously<br />
<br />
Will a HEAP table be beneficial for such a logic?. Since we insert/delete only 5k rows constantly, there should be constant recycled memory usage. But will it withstand such high volume insert/select/delete in very less amt of time [approx time taken should be&lt;=1.5 seconds]<br />
<br />
This need to be looked at scaling perspective also, where the same logic will run in parallel for a maximum of 2000 users concurrently [each user has his own temp table and base table] in different schemas on the same physical DB machine.<br />
<br />
Regards,<br />
Ravi]]></description>
            <dc:creator>Ravi Govind</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Wed, 22 Sep 2010 14:20:57 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,386881,386881#msg-386881</guid>
            <title>SysBench:  MySQL Cluster  vs  Memory Engine (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,386881,386881#msg-386881</link>
            <description><![CDATA[ How to speed up Sysbench on MySQL Cluster by 14x<br />
<a href="http://mikaelronstrom.blogspot.com/2010/09/how-to-speed-up-sysbench-on-mysql.html"  rel="nofollow">http://mikaelronstrom.blogspot.com/2010/09/how-to-speed-up-sysbench-on-mysql.html</a><br />
<br />
How to get Sysbench on Memory engine to perform<br />
<a href="http://mikaelronstrom.blogspot.com/2010/09/how-to-get-sysbench-on-memory-engine-to.html"  rel="nofollow">http://mikaelronstrom.blogspot.com/2010/09/how-to-get-sysbench-on-memory-engine-to.html</a>]]></description>
            <dc:creator>Edwin DeSouza</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Wed, 22 Sep 2010 14:16:52 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,382098,382098#msg-382098</guid>
            <title>Overflowing memory engine (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,382098,382098#msg-382098</link>
            <description><![CDATA[ I was wondering what happens if I try to insert more into a memory-engine table than the max_heap_table_size or tmp_table_size.  I doubt I will :) but given the volatile nature of the data, it's vaguely possible during a huge &quot;rush&quot; that we might hit it.  <br />
<br />
Does the insert simply fail, or otherwise gracefully fail somehow?  I'm trying to insert data into my db until it fails, but I thought I'd also ask.<br />
<br />
This is MySQL 5.0.77 64bit on RHEL 5.5 64bit.  <br />
<br />
Thank you,<br />
PH]]></description>
            <dc:creator>Paul Hirose</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Mon, 23 Aug 2010 22:53:01 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?92,379722,379722#msg-379722</guid>
            <title>Chat Sessions - Memory engine a good fit? (no replies)</title>
            <link>http://forums.mysql.com/read.php?92,379722,379722#msg-379722</link>
            <description><![CDATA[ I have an online chat service that stores chat sessions in an InnoDB table. Each user in a chat room makes a request to the server every few seconds. The script requested needs to query the user sessions table with a SELECT statement for all the users currently in the room. But, it also needs to UPDATE the user sessions table to store information like a timestamp of the last request and the key of the last served message.<br />
<br />
It seems like the Memory engine would be a good fit considering this data is small and expendable when there's a crash... But, I'm not sure about the high volume of UPDATE queries. Would this be okay with Memory engine's table locking or should I stay with InnoDB and its row locking?]]></description>
            <dc:creator>Jackson Owens</dc:creator>
            <category>Memory Storage Engine</category>
            <pubDate>Sat, 07 Aug 2010 00:07:46 +0000</pubDate>
        </item>
    </channel>
</rss>
