I have a .csv file with about 14000 objectIDs. My goal is to retrieve certain fields associated with these objectIDs. So far what I have done is concatenate all the objectIDs into a comma separated list that I append to the end of this query:
SELECT objectName, objectType FROM objectTable WHERE objectID IN 1001, 1002, 1003...
This however is very (very) slow as my database has about 16 million unique objectIDs. Is there a better way to structure such a query? Must I run this in batches? (I tried this too but it was unbearably slow) or is my entire approach wrong?
Load the objectIDs into a table and then join against that.