Bug #10342 disable keys for all tables
Submitted: 3 May 2005 16:37 Modified: 3 May 2005 16:46
Reporter: Jacek Becla Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[3 May 2005 16:37] Jacek Becla
Description:
Disabling keys for a table speeds up data loading. It would be handy to be able to disable/enable keys for all tables in a given database with a single command, something like 'ALTER DATABASE X DISABLE KEYS', 'ALTER TABLE X ENABLE KEYS'. This could internally iterate over all tables in database X and enable/disable keys for each of them. 

How to repeat:
N/A
[3 Oct 2008 19:10] Konstantin Osipov
Workaround: use a small stored procedure with Dynamic SQL.
Select from INFORMATION_SCHEMA.TABLES where schema_name=db, for each selected table run PREPARE stmt, EXECUTE stmt;
[3 Oct 2008 19:11] Konstantin Osipov
Needs new triage, provided a workaround.