I have 10mln rows in my table in MySQL and 7 indexes on this table. Now when I try to add 8th it takes infinite time to do this. Is there any way to workaround this problem to add easily and fast 8th index?
No, the time it takes to create an index is directly proportional to the amount of data you have. In MS SQL I create indexes on a table with that many records in about 10 minutes.
EDIT: After seeing comment, please elaborate on infinite. By definition you are saying it never finishes, my answer is related to a long running index creation and not infinite.
This is one of the thousand ways MySQL just sucks. By design...
Details: http://lists.mysql.com/mysql/202489
and I don't care if I lose karma for this answer.
Which engine are you using? The implementation of ALTER TABLE ... CREATE INDEX varies significantly.
Using MyISAM, any index change requires a complete table rebuild. This is not inherent to the engine, but a bug which has never been fixed.
Using InnoDB, creating a secondary index does not require a table rebuild, but this optimisation is only available if you're using the InnoDB plugin (rather than the older, shipped engine). Changing the primary key always requires a rebuild, because it is clustered.
Rebuilding the table (in either case) requires a lot of work as it must rebuild all the existing indexes, as well as rewriting the rows, in order to complete the operation. If your table fits in RAM (10M rows sounds like it should do easily), this is relatively quick.
Rebuilding a table which doesn't fit in ram is rather expensive, I recommend it's avoided if possible.
Rebuilding an individual index which doesn't fit in ram, is VERY expensive and is best avoided.
How often do you need to add new indexes? Perhaps you can populate the tables with the index already created?