tags:

views:

59

answers:

3

I have a large table (> 10 million rows) which I am adding new columns and indexes to.

This is taking progressively longer and longer to complete.

I have a powerful server with 16GB of memory available.

What are the best settings in my.cnf to increase in order to speed this process up?

A: 

read: http://peter-zaitsev.livejournal.com/11772.html

kv
This is useful for loading data, however I want to alter a table every now and again without doing a dataload each time. It doesn't have to be really fast, I just want to know how to make it faster than it currently is by allocated more resources in my.cnf.
Dan
A: 

use maatkit's tuning-primer. It'll look at your stats and give you recommendations on what settings you need to change.

Bottom line though is that you shouldn't be changing your schema or indexes. As you noticed, that method won't last as you get bigger and bigger. So maybe look at your design again.

You can also throw more hardware it at. Sounds like you need a disk array with a lot of disks.

NeuroScr
A: 

If using Innodb engine, set innodb_buffer_pool_size = 12000M in your my.cnf. This allocates 12G to MySQL for caching your data. If your machine is dedicated to MySQL, you may be able to go as high as 14G.

Gary