Missing index on forked_project_links
The table forked_project_links is currently the #1 (closed) sequentially scanned table, from queries such as:
SELECT COUNT(*) FROM "projects" INNER JOIN "forked_project_links" ON "projects"."id" = "forked_project_links"."forked_to_project_id" WHERE "projects"."pending_delete" = ? AND "forked_project_links"."forked_from_project_id" = ?
Having to sequentially scan the forked_project_links table. To avoid this, an index should be created on:
CREATE INDEX ON forked_project_links (forked_from_project_id);
This would greatly improve the performance of this query and likely others.