Solved

MySQL client ran out of memory

Posted on 2014-03-15
6
1,836 Views
Last Modified: 2014-03-27
Hi

I have an Atom (CPU D510 @ 1.66GHz) based Foxconn Nettop equipped with 1Gb RAM
running Debian Squeeze

It is basically a Syslog Repository
I recently tried to run a few queries and ran into memory issues:
mysql> select * from SystemEvents;
mysql: Out of memory (Needed 3616652 bytes)
ERROR 2008 (HY000): MySQL client ran out of memory
Syslog MyISAM DB row count (SystemEvents):
+--------------------------------+
| SUM(TABLE_ROWS) |
+--------------------------------+
|                    22996792 |
+--------------------------------+
swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda7                               partition       3004112 53180   -1
Is there a guide or rule of thumb to help one evaluate CPU and memory requirements for a DB system ?
Apart from FTP'ing the MySQL files to another system to run my queries is there a solution that would allow me to interrogate my table ?
thanks
yann
0
Comment
Question by:Yann Shukor
  • 3
6 Comments
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 39931681
Hi!

For a such large table and the amount of memory you have I suggest you write your queries in such a way that they only retrieve the specific info from the table you need
and not the whole table.

Build your queries using proper where clause and fetch only the amount of rows you actually want.
http://dev.mysql.com/doc/refman/5.5/en/select.html
http://dev.mysql.com/doc/refman/5.5/en/subqueries.html

Regards,
   Tomas Helgi
0
 

Author Closing Comment

by:Yann Shukor
ID: 39949637
doesn't answer both of my questions
0
 

Author Comment

by:Yann Shukor
ID: 39958324
Apparently the EE police doesn't accept my point of view
0
 

Author Comment

by:Yann Shukor
ID: 39959651
.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question