It blocks insert, update and delete operations on your lines
table until the index build is finished. So yes, if you haven't added your index concurrently then it may have severe effect on your heroku database.
For zero downtime migrations create indicies concurrently. In ActiveRecord 4 or higher it can be done as follows:
class AddIndexToAsksActive < ActiveRecord::Migration
# By default, ActiveRecord migrations are run inside a transaction.
# In order to pass it through, we need to use the following method
# to run our migration without a transaction.
disable_ddl_transaction!
def change
add_index :asks, :active, algorithm: :concurrently
end
end
Here is a good article on the subject