LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-13-2012, 03:29 PM   #1
arjunk9
LQ Newbie
 
Registered: Jun 2012
Posts: 1

Rep: Reputation: Disabled
MYD and MYI files in linux server taking 48GB space


Hi Everyone...

I am new to Linux environment. In my linux server I have 48GB data of MYD and MYI formate file. I am aware of this files belongs to mysql tables. I don't why this files took this much space(48GB). I have took my database backup its only 168MB.. help me please
 
Old 06-14-2012, 08:25 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
There are (at least) 3 options & it may be a combination thereof

1. a lot of data has been deleted from the DB.
DBs do NOT auto-shrink, but they often auto-extend

2. the DB was heavily fragmented;
given the numbers above, may be part of the problem

3. if you are using fixed length fields eg CHAR instead of VARCHAR, I think the DB always creates them as full length inside the DB, due to the matching algorithms used, but its possible that mysqldump only extracts the actual data ie without the trailing spaces/blanks.

The easiest way to test is to grab a spare system from somewhere and reload the dump.
If DB stays small, its options 1 & possibly 2
If DB inflates again, its option 3.

You should have a good read over at MySQL http://dev.mysql.com/doc/refman/5.1/en/
 
Old 06-14-2012, 08:35 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,784
Blog Entries: 17

Rep: Reputation: 3315Reputation: 3315Reputation: 3315Reputation: 3315Reputation: 3315Reputation: 3315Reputation: 3315Reputation: 3315Reputation: 3315Reputation: 3315Reputation: 3315
I am assuming that there's just the one database.

This is just a shot in the dark and I am not a DBA by any means, but you have done a database check, repair, and optimize? If so, what was the result.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mysql .MYD .MYI are missing ilvista Linux - Newbie 4 04-06-2011 04:07 AM
mysql MyISAM table doesn't have .MYD and MYI files. celeron Linux - Server 2 02-01-2011 08:35 AM
Deleted files taking up space airwolf2 Linux - Newbie 2 12-09-2007 03:42 PM
Application to convert MySQL files MYD, MYI, FRM to SQL text files ? SethShannon Linux - Newbie 1 09-28-2007 07:03 PM
Program that determines which files/directories are taking up the most space kaplan71 Linux - Software 1 02-09-2006 08:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration