[question][Rails+MySQL] Why does it recommend to configure max_execution_time longer for migration
cou929 opened this issue · 1 comments
cou929 commented
For migrations, you likely want to set a longer statement timeout. You can do this with
MySQL's max_execution_time only affects SELECT statements. And in migration, Rails looks like it only emits a small number of SELECT queries for schema_migrations or ar_internal_metadata, which are relatively smaller tables, so it seems not needed to set max_execution_time in migration for most cases.
Unlike MySQL, MariaDB's max_statement_time or Postgresql's statement_timeout seems affects any queries, not only SELECT. So it makes sense to change these timeout values in migration.