Solved

MySQL client ran out of memory

Posted on 2014-03-15
6
1,866 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

821 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