Problem Statement:
On Sitecore 9.0.1 when rebuild link database is taking way too long. When we are trying to rebuild link databases it is taking hours and not finishing.
Solution:
Ended up raising a Sitecore support ticket for this and learnt that slow rebuild of the link database was registered as a bug with reference number 115854 . The issue was fixed in Sitecore 9.2
Please use the link below to download the patch that improves the rebuild speed by introducing parallel rebuild :
https://sitecore.box.com/s/qqczqy0crellrbirj4x6ozpck0ytfjfe
To install the patch follow the instructions from the readme file inside the archive. More information about Sitecore patches can be found here:
https://kb.sitecore.net/articles/077333
Hope this helps!