MySQL Forums
Forum List  »  Performance

can you use INDEX DIRECTORY= with ALTER TABLE/CREATE INDEX?
Posted by: Mark Modrall
Date: December 21, 2005 04:48PM

Hi...

I have a process that creates an index temporarily on a table, uses it for some calculation, and then drops it. Someone else in our company found that for small indexes (and temporary) indexes he could get huge performance gains putting the index in a ram disk.

When I went to try the technique in my program (on pre-existing tables), I tried to specify INDEX DIRECTORY= on the CREATE INDEX statement, but I keep getting a parse error. At least as I understand the bnf for the documentation, it looks like it should work, but I'm not getting much in the error message about what the parse doesn't like. Is it just impossible to mix INDEX DIRECTORY with CREATE INDEX or ALTER TABLE?

I've tried
CREATE INDEX itest on test (time) INDEX_DIRECTORY='/mnt/ramtmp'
ALTER TABLE test ADD INDEX itest (time) INDEX_DIRECTORY='/mnt/ramtmp'

and get parse errors on both.

I'm using MySql 4.1.16.

Thanks
_mark

Options: ReplyQuote


Subject
Views
Written By
Posted
can you use INDEX DIRECTORY= with ALTER TABLE/CREATE INDEX?
2137
December 21, 2005 04:48PM


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.