1

I'm trying to add a new column to a very very large table, but my alter command fails miserably

mySQL [sc_production]> ALTER TABLE job_assets ADD COLUMN browser varchar(10) DEFAULT NULL, ALGORITHM=INPLACE, LOCK=NONE;
ERROR 1317 (70100): Query execution was interruptedy

I've tried without the LOCK as well, but it also failed:

mySQL [sc_production]> ALTER TABLE job_assets ADD COLUMN browser varchar(10) DEFAULT NULL,  ALGORITHM=INPLACE;
ERROR 1034 (HY000): Incorrect key file for table 'job_assets'; try to repair it

Is there any other way that I could do it ? Creating a new table with this column and migrating all the data would be a huge huge pain

Edit: I already have the max execution time set to 0

mySQL [sc_production]> show variables like '%max_execution_time%';
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| max_execution_time | 0 |

Thanks

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Scobee
  • 448
  • 7
  • 22
  • Related threads: https://stackoverflow.com/questions/1359097/mysql-alter-table-on-very-large-table-is-it-safe-to-run-it https://stackoverflow.com/questions/12774709/mysql-very-slow-for-alter-table-query but no immediate answers. MySQL and table changes seem to be really slow and memory hungry for big tables. Might want to increase the available memory if possible. – eis Oct 27 '21 at 11:21
  • 1
    I'll create a bigger RDS instance, with a lot more space and resources and see how it goes, maybe it's because of resources. I'll keep the topic updated once I finish testing – Scobee Oct 27 '21 at 12:38

0 Answers0