Solved

MySQL client ran out of memory

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now