What you want is to look at matching. The other option, which you don’t want here, is to put conditions on your contains.
As far as dealing with large data sets, check out the details on buffering result sets; by default, it’s doing this, and you want to turn that off.