Anyone know?
Currently I have 25,000 records in a mysql database.

What I am doing right now to see if something exists is the statement..
rs.Open "INSERT INTO yIDs (yID) VALUES ('" & yID & "')", Mysql_Connection

if the string doesnt exist, it is added to the database. if it does, i can tell as an error is raised (since yID is a primary key)

but i need something faster. I need to do about 50 queries a second with different strings, and this method takes a lot of CPU.

Is there a faster way anyone can think of? The ids are ~60 characters long. I need to be able to check if it exists in an array, if not add it.

Would building a string of all the ids on form_load, then using instr be faster?
What about arrays? Dictionary/collection objects? Anything else?