Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jan 2004
Posts: 31
L
newbie
newbie
L Offline
Joined: Jan 2004
Posts: 31
Just curious what optimizing tables actually does.

We're running 6.4.1. I optimized 2 days ago, our forums were dead today (100+ sec load times), so I optimized tables and the forums are flying again.

Joined: Jun 2006
Posts: 346
J
enthusiast
enthusiast
J Offline
Joined: Jun 2006
Posts: 346
http://www.mysql.com/information/presentations/presentation-oscon2000-20000719/index.html

<img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


--
Website Development and Management
www.jcswebdev.com
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
The short answer is that optimizing is really just taking out dead space. When MySQL writes out data that data takes space, of course. When the data is deleted, say removing posts for example, MySQL does not use that space again. It doesn't shrink it's table size. So you end up with a larger and more fragmented table which can slow youy down if you're already running your database right to the edge. Optimizing it removes the empty space.

What it actually does is rewrites the table out into a temporaty location, from scratch, which removes the dead space, then moves it back to where your table originally existed.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
Joined: Jan 2004
Posts: 44
I
newbie
newbie
I Offline
Joined: Jan 2004
Posts: 44
I am new to Threads.
How often do I do this? How long does it take, on a busyish board?
Thanks! <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />
Jen

Joined: Jun 2006
Posts: 742
enthusiast
enthusiast
Joined: Jun 2006
Posts: 742
Do it anytime you delete lots of posts. It doesn't take long at all - just a minute or two. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


Joshua Pettit
Web Developer
www.ThreadsDev.net | www.JoshuaPettit.com

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
Who's Online Now
1 members (Ruben), 1,277 guests, and 207 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)