MySQL Forums
Forum List  »  Memory Storage Engine

Re: MEMORY table size or index size limits
Posted by: Ingo Strüwing
Date: December 12, 2005 05:25AM

This is a 32-bit system. Isn't it?
This means that each process has a virtual address room of 4GB, in theory. For practical reasons this is split into segments. Executable code, data, stack and shared segments are almost always present. The start address of these segments is predefined in a way that an average application should be able to use as much of the 4G as possible. This means that none of the segments can grow even near to 4G in size. You try to extend the data segment (MEMORY tables use malloc()). To find the maximum size for the data segment in your environment, try the small program below:

#include <stdio.h>
#include <stdlib.h>

int main ( void )
{
size_t siz = 100 * 1024 * 1024 ;
size_t idx = 1 ;
void *ptr ;

for (;;)
{
ptr = malloc ( siz * idx );
if ( ! ptr )
break ;
free ( ptr );
idx ++ ;
}
printf ( "Max malloc %d * 100 MB \n", idx - 1 );
return ( 0 );
}

And this size is shared with caches, temporary tables (also MEMORY), etc.

The only thing that concerns me is the INSERT which fails without error. Can you please check this again? If it is repeatable, can you please send the statement "SHOW WARNINGS" immediately after the INSERT statement? Does it produce output?

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: MEMORY table size or index size limits
12048
December 12, 2005 05:25AM


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.