MySQL Forums
Forum List  »  Memory Storage Engine

Data length jumps from 0 to 719016 on first insert!!!
Posted by: jkoerber
Date: August 09, 2005 11:16AM

Well maybe I am missing something here about MEMORY tables but it I have been having errors specifying that "cannot connect to MySQL" and specifically when trying to read from my MEMORY table. I feel this error has something to do with the MEMORY tables but not sure. Why do they require so much memory (no pun intended) right off the bat.

Here are the values before my insert:

---- DATA: 0bytes INDEX: 0bytes TOTAL: 0bytes ROWS: 0 ROW-LENGTH: 11 ROW-SIZE: 0

And after a single insert:

---- DATA: 719,016bytes INDEX: 958,688bytes TOTAL: 1,638KB ROWS: 1 ROW-LENGTH: 11 ROW-SIZE: 1,638.4KB

Wow thats a lot of row size for a puny one row INSERT. Does anyone know what all this means. Is this a bug? Is this how its supposed to work?

I use REPLACE to re-use rows for each user record in the table so rarely have more than a dozen records in it.


My table is simple:

CREATE TABLE `sys_auth` (
`co_id` smallint(5) unsigned NOT NULL default '0',
`usernumber` int(10) unsigned NOT NULL default '0',
`last_timestamp` int(10) unsigned default NULL,
PRIMARY KEY (`usernumber`),
KEY `co_id` (`co_id`)
) ENGINE=HEAP DEFAULT CHARSET=latin1

I use it to store each users ID company ID and last timestamp when they sign into my app and each time they POST a new page.

Options: ReplyQuote


Subject
Views
Written By
Posted
Data length jumps from 0 to 719016 on first insert!!!
8845
August 09, 2005 11:16AM


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.