?
Solved

MySQL client ran out of memory

Posted on 2014-03-15
6
Medium Priority
?
2,106 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
4 Comments
 
LVL 26

Accepted Solution

by:
Tomas Helgi Johannsson earned 1500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month17 days, 3 hours left to enroll

862 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