MySQL Forums
Forum List  »  MyISAM

Re: Slow INSERTs on BIG tables.
Posted by: Ingo Strüwing
Date: November 18, 2005 05:41AM

Performance tuning is not one of my best skills. I would expect that the people in our "Performance" forum are much better. But I will share some of my thoughts anyway:

ENABLE KEYS rebuilds all indexes from scratch. So this is only advisable if you update a majority of rows in a go. Due to my lack of experience I cannot tell what a "majority" is. I suspect somewhere 50% and 90%. Anyway, if I understand your application correctly, you are far below this "majority". So forget about disable/enable keys.

IMHO, the best you can do is to look if you can get rid of one or more indexes. You should weigh the negative performance impact of indexes for updates against the positive impact on selects. If you have the chance (a second table for testing over night or so), drop all indexes and see how the modifications go. Then you would know what you could win by dropping indexes.

What you did not tell us is if the machine is I/O bound or CPU bound. During selects and during updates. Assuming I/O is the problem, you may try the following:

Another thing you could try is to increase 'key_cache_block_size'. Perhaps to 4096. This would give you bigger I/O chunks, but in most cases also overhead.

Add more RAM to the machine and increase 'key_buffer_size'.

Ingo

Options: ReplyQuote


Subject
Views
Written By
Posted
7323
November 17, 2005 11:16AM
Re: Slow INSERTs on BIG tables.
3656
November 18, 2005 05:41AM
3214
November 18, 2005 07:27AM
2759
November 21, 2005 02:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.