I am developing a rails application with MYSQL, and I created a migration to add indexes to tables. I also have a rake task that trims some of the tables and writes data.
ActiveRecord::Base.connection.execute("TRUNCATE #{Model.table_name}")
Do I need to add indexes after truncation? Thanks in advance:)
source
share