theGhost_k8
asked on
mysql DUMP without/of indexes
How can i take mysqldump without indexes ?
and also is there any way to only dump out the indexes ?
and also is there any way to only dump out the indexes ?
There is no option for mysqldump to include/exclude indexes independently from the rest of the table definitions. You would need to drop them after they are created, or use a text editor to delete those lines in the resulting text file (they should be pretty easy to identify as they will start with PRIMARY KEY, UNIQUE KEY or KEY, I believe).
ASKER
oh really!! even i was having the same idea but this article has confused me a lot...
it shows clearly that its possible.
http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=mysqldump
? --disable-keys, -K
For each table, surround the INSERT statements with /*!40000 ALTER
TABLE tbl_name DISABLE KEYS */; and /*!40000 ALTER TABLE tbl_name
ENABLE KEYS */; statements. This makes loading the dump file into a
MySQL 4.0 or newer server faster because the indexes are created
after all rows are inserted. This option is effective for MyISAM
tables only.
it shows clearly that its possible.
http://node1.yo-linux.com/cgi-bin/man2html?cgi_command=mysqldump
? --disable-keys, -K
For each table, surround the INSERT statements with /*!40000 ALTER
TABLE tbl_name DISABLE KEYS */; and /*!40000 ALTER TABLE tbl_name
ENABLE KEYS */; statements. This makes loading the dump file into a
MySQL 4.0 or newer server faster because the indexes are created
after all rows are inserted. This option is effective for MyISAM
tables only.
ASKER
oh sorry my mistake
ASKER
what are available options?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.