Trying to speed up database loading of search results.

Using a temporary table to 1) load all the data at once 2) cross-reference it with existing data 3) download all the new ids at once.
BugzId: 339