Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MySQL client ran out of memory

Posted on 2014-03-15
6
Medium Priority
?
2,073 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 25

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
What we learned in Webroot's webinar on multi-vector protection.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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…
Suggested Courses

636 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