I am trying to set a foreign key constraint on a 5.7 InnoDB table with 30M+ rows. It now already runs for 45 minutes on a quad core 64GB server. The processlist outputs the