Which will be faster, what will the answer depend on:
1) Looking up a numerical id in a DB table A, and then querying another table B for all instances of that numerical ID. where table B is likely to be 100x larger.
2) Querying table B directly using for the string in question.
Now that I write this I think intuitively solution 1 is faster (which is what I was going to do anyway) but would like to know your thoughts.
My reasoning is that it must be faster to compare two numbers wrt to comparing two strings, because, on average the numbers are shorter.