469,286 Members | 2,522 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,286 developers. It's quick & easy.

Compacting MYSQL

I hired someone to develop a web application for classified Ads using
MYSQL as the database. When I requested them to implement a way so
that the webmaster can compact the database, their reply was that,
there was no need to compact the database. I strongly think that the
database should be compacted once in a while since there are lots of
Inserts and Deletes.

I would like to know your opinion. Please reply to
jk********@hotmail.com

Thank you in advance
J James
Jul 19 '05 #1
6 16369
You are correct & they are wrong. DB's with lots of activity should be
optimized regularly. Doing so is easy.

LOCK TABLES tablename READ;
CHECK TABLE affils;
UNLOCK TABLES;

When completed,

OPTIMIZE TABLE tablename;

I created a simple text file with this info copied for each table in the DB.

I start up mysql from the % prompt and then simply type in 'source textfile'
and hit return. You then review the output. If there are any severe
problems, it will notify you and you can then take further corrective
actions.
"J James" <jk********@hotmail.com> wrote in message
news:9c**************************@posting.google.c om...
I hired someone to develop a web application for classified Ads using
MYSQL as the database. When I requested them to implement a way so
that the webmaster can compact the database, their reply was that,
there was no need to compact the database. I strongly think that the
database should be compacted once in a while since there are lots of
Inserts and Deletes.

I would like to know your opinion. Please reply to
jk********@hotmail.com

Thank you in advance
J James

Jul 19 '05 #2
You are correct & they are wrong. DB's with lots of activity should be
optimized regularly. Doing so is easy.

LOCK TABLES tablename READ;
CHECK TABLE affils;
UNLOCK TABLES;

When completed,

OPTIMIZE TABLE tablename;

I created a simple text file with this info copied for each table in the DB.

I start up mysql from the % prompt and then simply type in 'source textfile'
and hit return. You then review the output. If there are any severe
problems, it will notify you and you can then take further corrective
actions.
"J James" <jk********@hotmail.com> wrote in message
news:9c**************************@posting.google.c om...
I hired someone to develop a web application for classified Ads using
MYSQL as the database. When I requested them to implement a way so
that the webmaster can compact the database, their reply was that,
there was no need to compact the database. I strongly think that the
database should be compacted once in a while since there are lots of
Inserts and Deletes.

I would like to know your opinion. Please reply to
jk********@hotmail.com

Thank you in advance
J James

Jul 19 '05 #3
SR
On Sat, 7 Feb 2004 07:20:38 -0500, in mailing.database.mysql you wrote:
You are correct & they are wrong. DB's with lots of activity should be
optimized regularly. Doing so is easy.

LOCK TABLES tablename READ;
CHECK TABLE affils;
UNLOCK TABLES;
OPTIMIZE TABLE tablename;


What should one do when using InnoDb?
Jul 19 '05 #4
You are correct & they are wrong. DB's with lots of activity should be
optimized regularly. Doing so is easy.

LOCK TABLES tablename READ;
CHECK TABLE affils;
UNLOCK TABLES;

When completed,

OPTIMIZE TABLE tablename;

I created a simple text file with this info copied for each table in the DB.

I start up mysql from the % prompt and then simply type in 'source textfile'
and hit return. You then review the output. If there are any severe
problems, it will notify you and you can then take further corrective
actions.
"J James" <jk********@hotmail.com> wrote in message
news:9c**************************@posting.google.c om...
I hired someone to develop a web application for classified Ads using
MYSQL as the database. When I requested them to implement a way so
that the webmaster can compact the database, their reply was that,
there was no need to compact the database. I strongly think that the
database should be compacted once in a while since there are lots of
Inserts and Deletes.

I would like to know your opinion. Please reply to
jk********@hotmail.com

Thank you in advance
J James

Jul 19 '05 #5
SR
On Sat, 7 Feb 2004 07:20:38 -0500, in mailing.database.mysql you wrote:
You are correct & they are wrong. DB's with lots of activity should be
optimized regularly. Doing so is easy.

LOCK TABLES tablename READ;
CHECK TABLE affils;
UNLOCK TABLES;
OPTIMIZE TABLE tablename;


What should one do when using InnoDb?
Jul 19 '05 #6
SR
On Sat, 7 Feb 2004 07:20:38 -0500, in mailing.database.mysql you wrote:
You are correct & they are wrong. DB's with lots of activity should be
optimized regularly. Doing so is easy.

LOCK TABLES tablename READ;
CHECK TABLE affils;
UNLOCK TABLES;
OPTIMIZE TABLE tablename;


What should one do when using InnoDb?
Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by moller | last post: by
10 posts views Thread by Sonnich | last post: by
7 posts views Thread by DavidB | last post: by
1 post views Thread by Slez via AccessMonster.com | last post: by
3 posts views Thread by DSSMaster | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.