Look into the heirarchyId data type to see if there are potential optimization benefits from switching to this datatype instead of using ids. Microsoft documentation on the subject: https://learn.microsoft.com/en-us/sql/relational-databases/hierarchical-data-sql-server?view=sql-server-ver16