Hello,
from a quick read, if I understand the "problem" correctly, is that you anticipate on how to efficiently query a ever growing parts table; well, what I like for my code for those cases (although my case is a case - of course - of much smaller size :)) is to use a simple lookup "trie", which you may consider to replace the binary search, maybe will scale better,
greetings