Creating joining table using a recursive worfklow

I’m creating a joining table (datatype) to be populated with existing Things and their Subjects. Currently, I have a Things datatype, and each Thing has a list field that contains several Subjects. Subjects are an option set.

Each row in the new Thing-Subject joining datatype will have a Thing and a Subject, mirroring the connections already established in the Things datatype.

To populate the Thing-Subject joining datatype, I’m thinking I need to set up some fairly complex recursive workflows. The workflows would need to search for Things where a Subject in the Thing’s list field isn’t yet in the Thing-Subject joining table.

Thing-Subject entries would be created one by one. Since I have around 15,000 rows in my Things datatype, with 5-6 Subjects for each Thing on average, the new Things-Subjects datatype will be close to 100,000 entries and the recursive workflow may take a few days to complete.

Before I get too deep down this path, I wondered if I’m missing a more obvious and simpler way to do this?