# Optimize Database hangs half way through process

**URL:** <https://forums.plex.tv/t/optimize-database-hangs-half-way-through-process/739569>\
**Category:** General Discussions\
**Created:** [August 28, 2021, 10:17pm UTC](https://forums.plex.tv/t/optimize-database-hangs-half-way-through-process/739569 "2021-08-28T22:17:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![11138](https://avatars.discourse-cdn.com/v4/letter/1/49beb7/32.png) [@11138](https://forums.plex.tv/u/11138)\
**Post date:** [August 28, 2021, 10:17pm UTC](https://forums.plex.tv/t/optimize-database-hangs-half-way-through-process/739569/1 "2021-08-28T22:17:30Z")

</div>

hey there guys. I’ve had an recurring issue lately, and it has to do with my TV Library. when I try to load my tv library, it will either return a “unexpected error loading library” or take a good solid minute to load. especially when I have it sorted by “most recently episode aired”. my movie libraries all load near instantly. long story short, as far as trouble shooting goes, I’ve tried running a repair on my database, restarting my server and computer, I’ve tried restoring from a backup database, I’ve even tried deleting the tv library altogether and starting fresh, but when I do, that fails as well. it gets stuck on “deleting section 6” also, as the title suggests, whenever I try optimizing the database, it gets halfway through the process. and just stops and never finishes… any tips on how to sort this out?

---

<div class="post-metadata">

**Author:** ![11138](https://avatars.discourse-cdn.com/v4/letter/1/49beb7/32.png) [@11138](https://forums.plex.tv/u/11138)\
**Post date:** [August 28, 2021, 10:44pm UTC](https://forums.plex.tv/t/optimize-database-hangs-half-way-through-process/739569/2 "2021-08-28T22:44:17Z")

</div>

running pms on an iMac running Mac OS 11.5.2

---

<div class="post-metadata">

**Author:** ![11138](https://avatars.discourse-cdn.com/v4/letter/1/49beb7/32.png) [@11138](https://forums.plex.tv/u/11138)\
**Post date:** [August 29, 2021, 12:27am UTC](https://forums.plex.tv/t/optimize-database-hangs-half-way-through-process/739569/3 "2021-08-29T00:27:35Z")

</div>

here is a snap shot of my logs as Plex struggles to load the TV library

 ![Screen Shot 2021-08-28 at 4.26.07 PM](https://global.discourse-cdn.com/plex/original/3X/3/3/33a2e8cadbf592e3e6308e7c2fc50e867ac25fb0.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [November 27, 2021, 12:28am UTC](https://forums.plex.tv/t/optimize-database-hangs-half-way-through-process/739569/4 "2021-11-27T00:28:32Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
