i asked the question of whether an index would help me:
i understand that since i am adding code every time in this procedure, i would need to re-index. in this case is it even worth it to index every time?
You don’t need to re-index. Once you create an index it mysql, the engine automatically preserves that index. It updates it whenever the content of the table changes.