Forum Moderators: coopster

Message Too Old, No Replies

Optimizing MySQL tables

What's a good rule?

         

grnidone

9:14 pm on Dec 8, 2003 (gmt 0)



How often should one optimize MySQL tables?

Is there a good rule?

jatar_k

9:16 pm on Dec 8, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



[mysql.com...]

In most setups you don't have to run OPTIMIZE TABLE at all. Even if you do a lot of updates to variable length rows it's not likely that you need to do this more than once a month/week and only on certain tables.

sounds like a rule more or less.

jonknee

3:37 am on Dec 10, 2003 (gmt 0)

10+ Year Member



It's a better idea to keep up on your code and make sure there aren't any extra queries. Also, watch your indexes. A good index can dramaticlly speed up queries.

killroy

12:03 pm on Dec 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When ever I havea batch insert or update that takes some time I plunk the optimize in there too as the extra time won't show... except of course for large tables (where it can take half an hour or more).

SN