Jeff,
To create a new list, you'll need to perform a Create activity and then add the newly created Object to a list you've created. However, this will be a list of objects with each object having an attribute which contains the ID value. For this reason, I don't think comparing your 2 lists will give you the results you're after. Mendix will compare the lists to see if the same objects are in both lists, not the same IDs.
I think the best way to accomplish this is to
unless you have a very large number of IDs, this approach should work well.
Hope that helps,
Mike
***Edit***
Yes, that is what I was thinking. I can't really evaluate if timing is accurate/good without a lot more information about your database. However, .4 seconds per record for 22,000 means it would run for a bit less than 3 hours - this is definitely a good candidate for processing in a batch fashion. I would approach as follows:
If this is a one time exercise, you can remove the scheduled event once it completes successfully.
The reason I would take this approach is to avoid any out of resource errors you may see if you try to commit 22,000 objects in one commit action.
Iterate over your returned objects, within the iterator do a retrieve action that pulls back the "first" object based on the paramenter match [$iteratorobject/uniquevalue = uniquevalue], from there you have an exclusive split in that split you check to see if the retrieved object is empty, if so, create a new persisted object and set the values, if not, just continue the event.