The current issue to build link index table it way to slow on larger instances.
This index is used on the different issue panels and for the JQL field indexing on Server and Data Center.
The issue-link table should be refactored to two tables, issue-to-jobs and issue-to-builds to improve performance when only interested in the jobs an issue is linked to.
Indexing should use a cached view on the link data. On every link or relink between a build and an issue this cache should be updated so that the indexing can limit its Datastore query to a single query per issue that will be quick and contains all the calculated data the indexer needs.