# Repairing a big database

**URL:** <https://forum.duplicati.com/t/repairing-a-big-database/8174>\
**Category:** How-To\
**Created:** [October 3, 2019, 4:54pm UTC](https://forum.duplicati.com/t/repairing-a-big-database/8174 "2019-10-03T16:54:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![lhs\_azevedo](https://forum.duplicati.com/user_avatar/forum.duplicati.com/lhs_azevedo/32/4229_2.png) [@lhs\_azevedo](https://forum.duplicati.com/u/lhs_azevedo)\
**Post date:** [October 3, 2019, 9:16pm UTC](https://forum.duplicati.com/t/repairing-a-big-database/8174/4 "2019-10-03T21:16:13Z")

</div>

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

```sql
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](https://sqlitebrowser.org/) 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?

---

_[View the full topic](https://forum.duplicati.com/t/repairing-a-big-database/8174)._
