Workflow action dependent on an Input's value

Hi everyone, I have an input of Type “address” and based on the actual address typed in by the user, it’s either added to the database as a new “thing” (along with other info about the address) OR a seperate set of tasks need to be done depending on if the entered address already exists as an item in the “property address” field of the data base. I understand I’d need to trigger two alternate worflow actions here once SUBMIT is clicked depending on if the address alreay exists in the databse or not. I’m not able to figure out how to look for the specific address and also do it effiiently assuming this could become a failry large databse with thousands of address.
Thanks in advance!