On 21 Feb 2014, at 11:22, Andrew Stewart wrote: > Does anyone have any tips? Have you considered precomputing some kind of hash (of the attributes whose values you care about) when you create/update the record, and then indexing & querying on that? Even if there are collisions, it's probably easy to filter them out in Ruby after the query. Cheers, -Tom