MySQL Forums
Forum List  »  MyISAM

Re: myisamchk sorting records descending
Posted by: James Day
Date: May 04, 2005 05:24PM

If you have a suitable key you might try using a where in the select and processing many batches, perhaps one for each letter of the alphabet. If you can keep the size of the records within the amount of RAM you have left to the operating system for caching MyISAM data that could be significantly faster.

If it's worth it for your application you could do something like sorting on a slave with replication stopped then turning on replication so the slave catches up and finally copying the files to the main system. Not a nice approach but it's one way to get things done if the benefit is worth it.

If you say more about the size of the data and indexes for this table on disk and say how much RAM you have and your key_buffer_size and other my.cnf settings that might povide some possibility for suggesting an optimization in those settings.

If it wasn't for the fulltext part I'd suggest consideing InnoDB with a primary/clustered key which matches the order you want, because InnoDB would automatically store the records in the right order. Fulltext search is planned for InnoDB but not for some time.

---
James Day, Support Engineer
MySQL AB, London, England, www.mysql.com

Options: ReplyQuote


Subject
Views
Written By
Posted
7031
April 12, 2005 01:19AM
3286
April 26, 2005 12:50AM
2997
April 28, 2005 08:21AM
Re: myisamchk sorting records descending
2887
May 04, 2005 05:24PM


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.