Repairing a big database

I think I found out the cause (or one of) of the slow repair, this query:

SELECT COUNT(*) FROM "Block" WHERE "Size" > 102400

My “Block” table has 29.468.226 rows. The repair has been running for more than 3 hours, most of the time running this query that is not finished yet.

Using DB Browser for SQLite I was able to add an index to an copy of the database and the query took only 11ms to execute.

It’s safe to create this index on the live database?